Skip to content

Commit a3cd058

Browse files
committed
Merge branch 'develop' of https://github.com/stdlib-js/stdlib into develop
--- type: pre_push_report description: Results of running various checks prior to pushing changes. report: - task: run_javascript_examples status: passed - task: run_c_examples status: na - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: passed - task: run_c_benchmarks status: na - task: run_cpp_benchmarks status: na - task: run_fortran_benchmarks status: na - task: run_javascript_benchmarks status: na - task: run_julia_benchmarks status: na - task: run_python_benchmarks status: na - task: run_r_benchmarks status: na - task: run_javascript_tests status: na ---
2 parents 0db19ee + abf124e commit a3cd058

File tree

29 files changed

+1176
-90
lines changed

29 files changed

+1176
-90
lines changed

.github/workflows/lint_changed_files.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,21 @@ jobs:
7272
node-version: '20' # 'lts/*'
7373
timeout-minutes: 5
7474

75+
# Cache dependencies:
76+
- name: 'Cache dependencies'
77+
# Pin action to full length commit SHA
78+
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
79+
id: cache
80+
with:
81+
path: |
82+
${{ github.workspace }}/node_modules
83+
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
84+
restore-keys: |
85+
${{ runner.os }}-node-
86+
7587
# Install dependencies (accounting for possible network failures, etc, when installing node module dependencies):
7688
- name: 'Install dependencies'
89+
if: steps.cache.outputs.cache-hit != 'true'
7790
run: |
7891
make install-node-modules || make install-node-modules || make install-node-modules
7992
timeout-minutes: 15

lib/node_modules/@stdlib/array/base/README.md

Lines changed: 69 additions & 0 deletions
Large diffs are not rendered by default.

lib/node_modules/@stdlib/array/base/assert/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ The namespace exports the following:
6767
- <span class="signature">[`isSafeDataTypeCast( from, to )`][@stdlib/array/base/assert/is-safe-data-type-cast]</span><span class="delimiter">: </span><span class="description">determine whether an array data type can be safely cast to another array data type.</span>
6868
- <span class="signature">[`isSameKindDataTypeCast( from, to )`][@stdlib/array/base/assert/is-same-kind-data-type-cast]</span><span class="delimiter">: </span><span class="description">determine whether an array data type can be safely cast to, or is of the same "kind" as, another array data type.</span>
6969
- <span class="signature">[`isSignedIntegerDataType( value )`][@stdlib/array/base/assert/is-signed-integer-data-type]</span><span class="delimiter">: </span><span class="description">test if an input value is a supported array signed integer data type.</span>
70+
- <span class="signature">[`isSortedAscending( x )`][@stdlib/array/base/assert/is-sorted-ascending]</span><span class="delimiter">: </span><span class="description">test if an array is sorted in ascending order.</span>
7071
- <span class="signature">[`isUnsignedIntegerDataType( value )`][@stdlib/array/base/assert/is-unsigned-integer-data-type]</span><span class="delimiter">: </span><span class="description">test if an input value is a supported array unsigned integer data type.</span>
7172

7273
</div>
@@ -218,6 +219,8 @@ console.log( 'arr4 is complex typed array: ' + ns.isComplexTypedArray( arr4 ) );
218219

219220
[@stdlib/array/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert/is-signed-integer-data-type
220221

222+
[@stdlib/array/base/assert/is-sorted-ascending]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert/is-sorted-ascending
223+
221224
[@stdlib/array/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/assert/is-unsigned-integer-data-type
222225

223226
<!-- </toc-links> -->

lib/node_modules/@stdlib/array/base/assert/docs/types/index.d.ts

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ import isRealFloatingPointDataType = require( '@stdlib/array/base/assert/is-real
4242
import isSafeDataTypeCast = require( '@stdlib/array/base/assert/is-safe-data-type-cast' );
4343
import isSameKindDataTypeCast = require( '@stdlib/array/base/assert/is-same-kind-data-type-cast' );
4444
import isSignedIntegerDataType = require( '@stdlib/array/base/assert/is-signed-integer-data-type' );
45+
import isSortedAscending = require( '@stdlib/array/base/assert/is-sorted-ascending' );
4546
import isUnsignedIntegerDataType = require( '@stdlib/array/base/assert/is-unsigned-integer-data-type' );
4647

4748
/**
@@ -689,6 +690,38 @@ interface Namespace {
689690
*/
690691
isSignedIntegerDataType: typeof isSignedIntegerDataType;
691692

693+
/**
694+
* Tests if an array is sorted in ascending order.
695+
*
696+
* @param x - input array
697+
* @returns boolean indicating if an array is sorted in ascending order
698+
*
699+
* @example
700+
* var out = ns.isSortedAscending( [ 1, 2, 3 ] );
701+
* // returns true
702+
*
703+
* @example
704+
* var out = ns.isSortedAscending( [ 3, 2, 1 ] );
705+
* // returns false
706+
*
707+
* @example
708+
* var out = ns.isSortedAscending( [ 3, 3, 3 ] );
709+
* // returns true
710+
*
711+
* @example
712+
* var out = ns.isSortedAscending( [ 3 ] );
713+
* // returns true
714+
*
715+
* @example
716+
* var out = ns.isSortedAscending( [] );
717+
* // returns false
718+
*
719+
* @example
720+
* var out = ns.isSortedAscending( [ 1, 3, 2 ] );
721+
* // returns false
722+
*/
723+
isSortedAscending: typeof isSortedAscending;
724+
692725
/**
693726
* Tests whether an input value is a supported array unsigned integer data type.
694727
*

0 commit comments

Comments
 (0)