Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Mar 23, 2022
1 parent 5a3ae19 commit a16d40e
Show file tree
Hide file tree
Showing 11 changed files with 444 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
benchmark:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
with:
node-version: 16
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/bundle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ on:
push:
branches:
- main
tags_ignore:
tags-ignore:
- 'v[0-9]+\.[0-9]+\.[0-9]+'

# Workflow jobs:
jobs:
deno:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Copy files to deno directory
run: |
mkdir -p deno
Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./deno
publish_branch: deno
keep_files: true
force_orphan: true
user_name: 'stdlib-bot'
user_email: '[email protected]'
commit_message: 'Auto-generated commit'
Expand All @@ -107,7 +107,7 @@ jobs:
umd:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Copy files to umd directory
run: |
mkdir -p umd
Expand Down Expand Up @@ -153,7 +153,7 @@ jobs:
find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "1 while s/<script type=\"text\/javascript\">\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);?/<script type=\"text\/javascript\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/bundle.js\"><\/script>\n<script type=\"text\/javascript\">/g"
# Wrap contents of `<script type="text/javascript">` tag contents in an IIFE:
find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/<script type=\"text\/javascript\">([\s\S]+?)<\/script>/<script type=\"text\/javascript\">\n\(function \(\) {\1}\)\(\)\n<\/script>/g"
find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/<script type=\"text\/javascript\">([\s\S]+?)<\/script>/<script type=\"text\/javascript\">\n\(function \(\) {\1}\)\(\);\n<\/script>/g"
# Create package.json file for umd branch:
jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "main": "./bundle.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./umd/package.json
Expand All @@ -164,7 +164,7 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./umd
publish_branch: umd
keep_files: true
force_orphan: true
user_name: 'stdlib-bot'
user_email: '[email protected]'
commit_message: 'Auto-generated commit'
Expand All @@ -179,7 +179,7 @@ jobs:
esm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Copy files to umd directory
run: |
mkdir -p esm
Expand Down Expand Up @@ -242,7 +242,7 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./esm
publish_branch: esm
keep_files: true
force_orphan: true
user_name: 'stdlib-bot'
user_email: '[email protected]'
commit_message: 'Auto-generated commit'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
examples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
with:
node-version: 16
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
with:
node-version: 16
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout main branch
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
ref: main
- name: Increment version in `package.json` to the version number of the tag
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
with:
node-version: 16
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test_bundles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
steps:
- name: Checkout branch with UMD build
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
ref: umd
- name: Setup Node.js
Expand All @@ -57,7 +57,7 @@ jobs:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
steps:
- name: Checkout branch with ESM build
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
ref: esm
- name: Setup Node.js
Expand All @@ -80,7 +80,7 @@ jobs:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
steps:
- name: Checkout branch with Deno build
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
ref: deno
- name: Install Deno
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
with:
node-version: 16
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
with:
node-version: 16
Expand Down
24 changes: 24 additions & 0 deletions base/assert/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import isContiguous = require( './../../../../base/assert/is-contiguous' );
import isDataType = require( './../../../../base/assert/is-data-type' );
import isIndexMode = require( './../../../../base/assert/is-index-mode' );
import isOrder = require( './../../../../base/assert/is-order' );
import isReadOnly = require( './../../../../base/assert/is-read-only' );
import isRowMajor = require( './../../../../base/assert/is-row-major' );
import isRowMajorContiguous = require( './../../../../base/assert/is-row-major-contiguous' );
import isSafeDataTypeCast = require( './../../../../base/assert/is-safe-data-type-cast' );
Expand Down Expand Up @@ -300,6 +301,29 @@ interface Namespace {
*/
isOrder: typeof isOrder;

/**
* Tests whether an ndarray is read-only.
*
* @param arr - input ndarray
* @returns boolean indicating whether an ndarray is read-only
*
* @example
* var array = require( `@stdlib/ndarray/array` );
*
* var x = array( [ [ 1, 2 ], [ 3, 4 ] ], {
* 'readonly': true
* });
* var bool = ns.isReadOnly( x );
* // returns true
*
* x = array( [ [ 1, 2 ], [ 3, 4 ] ], {
* 'readonly': false
* });
* bool = ns.isReadOnly( x );
* // returns false
*/
isReadOnly: typeof isReadOnly;

/**
* Returns a boolean indicating if an array is row-major based on a provided stride array.
*
Expand Down
Loading

0 comments on commit a16d40e

Please sign in to comment.