From 937dd6d671281899cd9adfd8b899fde0d0a8fc26 Mon Sep 17 00:00:00 2001 From: Jaysukh-409 Date: Mon, 3 Jun 2024 15:29:36 +0530 Subject: [PATCH 1/9] feat: add assert/is-booleanarray --- .../@stdlib/assert/is-booleanarray/README.md | 150 ++++++++++++++++++ .../is-booleanarray/benchmark/benchmark.js | 135 ++++++++++++++++ .../assert/is-booleanarray/docs/repl.txt | 24 +++ .../is-booleanarray/docs/types/index.d.ts | 44 +++++ .../assert/is-booleanarray/docs/types/test.ts | 33 ++++ .../assert/is-booleanarray/examples/index.js | 93 +++++++++++ .../assert/is-booleanarray/lib/index.js | 43 +++++ .../assert/is-booleanarray/lib/main.js | 53 +++++++ .../assert/is-booleanarray/package.json | 79 +++++++++ .../assert/is-booleanarray/test/test.js | 84 ++++++++++ 10 files changed, 738 insertions(+) create mode 100644 lib/node_modules/@stdlib/assert/is-booleanarray/README.md create mode 100644 lib/node_modules/@stdlib/assert/is-booleanarray/benchmark/benchmark.js create mode 100644 lib/node_modules/@stdlib/assert/is-booleanarray/docs/repl.txt create mode 100644 lib/node_modules/@stdlib/assert/is-booleanarray/docs/types/index.d.ts create mode 100644 lib/node_modules/@stdlib/assert/is-booleanarray/docs/types/test.ts create mode 100644 lib/node_modules/@stdlib/assert/is-booleanarray/examples/index.js create mode 100644 lib/node_modules/@stdlib/assert/is-booleanarray/lib/index.js create mode 100644 lib/node_modules/@stdlib/assert/is-booleanarray/lib/main.js create mode 100644 lib/node_modules/@stdlib/assert/is-booleanarray/package.json create mode 100644 lib/node_modules/@stdlib/assert/is-booleanarray/test/test.js diff --git a/lib/node_modules/@stdlib/assert/is-booleanarray/README.md b/lib/node_modules/@stdlib/assert/is-booleanarray/README.md new file mode 100644 index 000000000000..a48820aec549 --- /dev/null +++ b/lib/node_modules/@stdlib/assert/is-booleanarray/README.md @@ -0,0 +1,150 @@ + + +# isBooleanArray + +> Test if a value is a [BooleanArray][@stdlib/array/bool]. + +
+ +## Usage + +```javascript +var isBooleanArray = require( '@stdlib/assert/is-booleanarray' ); +``` + +#### isComplex64Array( value ) + +Tests if a value is a [`BooleanArray`][@stdlib/array/bool]. + +```javascript +var BooleanArray = require( '@stdlib/array/bool' ); + +var bool = isBooleanArray( new BooleanArray( 10 ) ); +// returns true + +bool = isBooleanArray( [] ); +// returns false +``` + +
+ + + +
+ +## Examples + + + +```javascript +var Int8Array = require( '@stdlib/array/int8' ); +var Uint8Array = require( '@stdlib/array/uint8' ); +var Uint8ClampedArray = require( '@stdlib/array/uint8c' ); +var Int16Array = require( '@stdlib/array/int16' ); +var Uint16Array = require( '@stdlib/array/uint16' ); +var Int32Array = require( '@stdlib/array/int32' ); +var Uint32Array = require( '@stdlib/array/uint32' ); +var Float32Array = require( '@stdlib/array/float32' ); +var Float64Array = require( '@stdlib/array/float64' ); +var Complex128Array = require( '@stdlib/array/complex128' ); +var Complex64Array = require( '@stdlib/array/complex64' ); +var BooleanArray = require( '@stdlib/array/bool' ); +var isBooleanArray = require( '@stdlib/assert/is-booleanarray' ); + +var bool = isBooleanArray( new BooleanArray( 10 ) ); +// returns true + +bool = isBooleanArray( new Complex64Array( 10 ) ); +// returns false + +bool = isBooleanArray( new Complex128Array( 10 ) ); +// returns false + +bool = isBooleanArray( new Float64Array( 10 ) ); +// returns false + +bool = isBooleanArray( new Int8Array( 10 ) ); +// returns false + +bool = isBooleanArray( new Uint8Array( 10 ) ); +// returns false + +bool = isBooleanArray( new Uint8ClampedArray( 10 ) ); +// returns false + +bool = isBooleanArray( new Int16Array( 10 ) ); +// returns false + +bool = isBooleanArray( new Uint16Array( 10 ) ); +// returns false + +bool = isBooleanArray( new Int32Array( 10 ) ); +// returns false + +bool = isBooleanArray( new Uint32Array( 10 ) ); +// returns false + +bool = isBooleanArray( new Float32Array( 10 ) ); +// returns false + +bool = isBooleanArray( new Array( 10 ) ); +// returns false + +bool = isBooleanArray( {} ); +// returns false + +bool = isBooleanArray( null ); +// returns false +``` + +
+ + + + + + + + + + + + + + diff --git a/lib/node_modules/@stdlib/assert/is-booleanarray/benchmark/benchmark.js b/lib/node_modules/@stdlib/assert/is-booleanarray/benchmark/benchmark.js new file mode 100644 index 000000000000..3ba08e944a41 --- /dev/null +++ b/lib/node_modules/@stdlib/assert/is-booleanarray/benchmark/benchmark.js @@ -0,0 +1,135 @@ +/** +* @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 bench = require( '@stdlib/bench' ); +var Int8Array = require( '@stdlib/array/int8' ); +var Uint8Array = require( '@stdlib/array/uint8' ); +var Uint8ClampedArray = require( '@stdlib/array/uint8c' ); +var Int16Array = require( '@stdlib/array/int16' ); +var Uint16Array = require( '@stdlib/array/uint16' ); +var Int32Array = require( '@stdlib/array/int32' ); +var Uint32Array = require( '@stdlib/array/uint32' ); +var Float32Array = require( '@stdlib/array/float32' ); +var Float64Array = require( '@stdlib/array/float64' ); +var Complex64Array = require( '@stdlib/array/complex64' ); +var Complex128Array = require( '@stdlib/array/complex128' ); +var BooleanArray = require( '@stdlib/array/bool' ); +var isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive; +var pkg = require( './../package.json' ).name; +var isBooleanArray = require( './../lib' ); + + +// MAIN // + +bench( pkg, function benchmark( b ) { + var values; + var bool; + var i; + + values = [ + new Float64Array( 10 ), + new Float32Array( 10 ), + new Int32Array( 10 ), + new Uint32Array( 10 ), + new Int16Array( 10 ), + new Uint16Array( 10 ), + new Int8Array( 10 ), + new Uint8Array( 10 ), + new Uint8ClampedArray( 10 ), + new Complex64Array( 10 ), + new Complex128Array( 10 ), + new BooleanArray( 10 ) + ]; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + bool = isBooleanArray( values[ i%values.length ] ); + if ( typeof bool !== 'boolean' ) { + b.fail( 'should return a boolean' ); + } + } + b.toc(); + if ( !isBoolean( bool ) ) { + b.fail( 'should return a boolean' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); + +bench( pkg+'::true', function benchmark( b ) { + var values; + var bool; + var i; + + values = [ + new BooleanArray( 10 ), + new BooleanArray( 10 ) + ]; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + bool = isBooleanArray( values[ i%values.length ] ); + if ( typeof bool !== 'boolean' ) { + b.fail( 'should return a boolean' ); + } + } + b.toc(); + if ( !isBoolean( bool ) ) { + b.fail( 'should return a boolean' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); + +bench( pkg+'::false', function benchmark( b ) { + var values; + var bool; + var i; + + values = [ + new Complex128Array( 10 ), + new Complex64Array( 10 ), + new Float64Array( 10 ), + new Float32Array( 10 ), + new Int32Array( 10 ), + new Uint32Array( 10 ), + new Int16Array( 10 ), + new Uint16Array( 10 ), + new Int8Array( 10 ), + new Uint8Array( 10 ), + new Uint8ClampedArray( 10 ) + ]; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + bool = isBooleanArray( values[ i%values.length ] ); + if ( typeof bool !== 'boolean' ) { + b.fail( 'should return a boolean' ); + } + } + b.toc(); + if ( !isBoolean( bool ) ) { + b.fail( 'should return a boolean' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); diff --git a/lib/node_modules/@stdlib/assert/is-booleanarray/docs/repl.txt b/lib/node_modules/@stdlib/assert/is-booleanarray/docs/repl.txt new file mode 100644 index 000000000000..de173a0ca858 --- /dev/null +++ b/lib/node_modules/@stdlib/assert/is-booleanarray/docs/repl.txt @@ -0,0 +1,24 @@ + +{{alias}}( value ) + Tests if a value is a BooleanArray. + + Parameters + ---------- + value: any + Value to test. + + Returns + ------- + bool: boolean + Boolean indicating whether value is a BooleanArray. + + Examples + -------- + > var bool = {{alias}}( new {{alias:@stdlib/array/bool}}( 10 ) ) + true + > bool = {{alias}}( [] ) + false + + See Also + -------- + diff --git a/lib/node_modules/@stdlib/assert/is-booleanarray/docs/types/index.d.ts b/lib/node_modules/@stdlib/assert/is-booleanarray/docs/types/index.d.ts new file mode 100644 index 000000000000..b4a071af9149 --- /dev/null +++ b/lib/node_modules/@stdlib/assert/is-booleanarray/docs/types/index.d.ts @@ -0,0 +1,44 @@ +/* +* @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. +*/ + +// TypeScript Version: 4.1 + +/// + +import { BooleanArray } from '@stdlib/types/array'; + +/** +* Tests if a value is a BooleanArray. +* +* @param value - value to test +* @returns boolean indicating whether value is a BooleanArray +* +* @example +* var bool = isBooleanArray( new BooleanArray( 10 ) ); +* // returns true +* +* @example +* var bool = isBooleanArray( [] ); +* // returns false +*/ +declare function isBooleanArray( value: any ): value is BooleanArray; + + +// EXPORTS // + +export = isBooleanArray; diff --git a/lib/node_modules/@stdlib/assert/is-booleanarray/docs/types/test.ts b/lib/node_modules/@stdlib/assert/is-booleanarray/docs/types/test.ts new file mode 100644 index 000000000000..dd955f8b2eaf --- /dev/null +++ b/lib/node_modules/@stdlib/assert/is-booleanarray/docs/types/test.ts @@ -0,0 +1,33 @@ +/* +* @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. +*/ + +import isBooleanArray = require( './index' ); + + +// TESTS // + +// The function returns a boolean... +{ + isBooleanArray( [] ); // $ExpectType boolean +} + +// The compiler throws an error if the function is provided an unsupported number of arguments... +{ + isBooleanArray(); // $ExpectError + isBooleanArray( [], 123 ); // $ExpectError +} diff --git a/lib/node_modules/@stdlib/assert/is-booleanarray/examples/index.js b/lib/node_modules/@stdlib/assert/is-booleanarray/examples/index.js new file mode 100644 index 000000000000..d6bc45d671e2 --- /dev/null +++ b/lib/node_modules/@stdlib/assert/is-booleanarray/examples/index.js @@ -0,0 +1,93 @@ +/** +* @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'; + +var Int8Array = require( '@stdlib/array/int8' ); +var Uint8Array = require( '@stdlib/array/uint8' ); +var Uint8ClampedArray = require( '@stdlib/array/uint8c' ); +var Int16Array = require( '@stdlib/array/int16' ); +var Uint16Array = require( '@stdlib/array/uint16' ); +var Int32Array = require( '@stdlib/array/int32' ); +var Uint32Array = require( '@stdlib/array/uint32' ); +var Float32Array = require( '@stdlib/array/float32' ); +var Float64Array = require( '@stdlib/array/float64' ); +var Complex128Array = require( '@stdlib/array/complex128' ); +var Complex64Array = require( '@stdlib/array/complex64' ); +var BooleanArray = require( '@stdlib/array/bool' ); +var isBooleanArray = require( './../lib' ); + +var bool = isBooleanArray( new BooleanArray( 10 ) ); +console.log( bool ); +// => true + +bool = isBooleanArray( new Complex64Array( 10 ) ); +console.log( bool ); +// => false + +bool = isBooleanArray( new Complex128Array( 10 ) ); +console.log( bool ); +// => false + +bool = isBooleanArray( new Float64Array( 10 ) ); +console.log( bool ); +// => false + +bool = isBooleanArray( new Int8Array( 10 ) ); +console.log( bool ); +// => false + +bool = isBooleanArray( new Uint8Array( 10 ) ); +console.log( bool ); +// => false + +bool = isBooleanArray( new Uint8ClampedArray( 10 ) ); +console.log( bool ); +// => false + +bool = isBooleanArray( new Int16Array( 10 ) ); +console.log( bool ); +// => false + +bool = isBooleanArray( new Uint16Array( 10 ) ); +console.log( bool ); +// => false + +bool = isBooleanArray( new Int32Array( 10 ) ); +console.log( bool ); +// => false + +bool = isBooleanArray( new Uint32Array( 10 ) ); +console.log( bool ); +// => false + +bool = isBooleanArray( new Float32Array( 10 ) ); +console.log( bool ); +// => false + +bool = isBooleanArray( new Array( 10 ) ); +console.log( bool ); +// => false + +bool = isBooleanArray( {} ); +console.log( bool ); +// => false + +bool = isBooleanArray( null ); +console.log( bool ); +// => false diff --git a/lib/node_modules/@stdlib/assert/is-booleanarray/lib/index.js b/lib/node_modules/@stdlib/assert/is-booleanarray/lib/index.js new file mode 100644 index 000000000000..4ea3fe2e925b --- /dev/null +++ b/lib/node_modules/@stdlib/assert/is-booleanarray/lib/index.js @@ -0,0 +1,43 @@ +/** +* @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'; + +/** +* Test if a value is a BooleanArray. +* +* @module @stdlib/assert/is-booleanarray +* +* @example +* var isBooleanArray = require( '@stdlib/assert/is-booleanarray' ); +* +* var bool = isBooleanArray( new BooleanArray( 10 ) ); +* // returns true +* +* bool = isBooleanArray( [] ); +* // returns false +*/ + +// MODULES // + +var isBooleanArray = require( './main.js' ); + + +// EXPORTS // + +module.exports = isBooleanArray; diff --git a/lib/node_modules/@stdlib/assert/is-booleanarray/lib/main.js b/lib/node_modules/@stdlib/assert/is-booleanarray/lib/main.js new file mode 100644 index 000000000000..feb0755210d9 --- /dev/null +++ b/lib/node_modules/@stdlib/assert/is-booleanarray/lib/main.js @@ -0,0 +1,53 @@ +/** +* @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 BooleanArray = require( '@stdlib/array/bool' ); +var constructorName = require( '@stdlib/utils/constructor-name' ); + + +// MAIN // + +/** +* Tests if a value is a Complex64Array. +* +* @param {*} value - value to test +* @returns {boolean} boolean indicating whether value is a BooleanArray +* +* @example +* var bool = isBooleanArray( new BooleanArray( 10 ) ); +* // returns true +* +* @example +* var bool = isBooleanArray( [] ); +* // returns false +*/ +function isBooleanArray( value ) { + return ( + value instanceof BooleanArray || + constructorName( value ) === 'BooleanArray' + ); +} + + +// EXPORTS // + +module.exports = isBooleanArray; diff --git a/lib/node_modules/@stdlib/assert/is-booleanarray/package.json b/lib/node_modules/@stdlib/assert/is-booleanarray/package.json new file mode 100644 index 000000000000..c93f9fb058e1 --- /dev/null +++ b/lib/node_modules/@stdlib/assert/is-booleanarray/package.json @@ -0,0 +1,79 @@ +{ + "name": "@stdlib/assert/is-booleanarray", + "version": "0.0.0", + "description": "Test if a value is a BooleanArray.", + "license": "Apache-2.0", + "author": { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + }, + "contributors": [ + { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + } + ], + "main": "./lib", + "directories": { + "benchmark": "./benchmark", + "doc": "./docs", + "example": "./examples", + "lib": "./lib", + "test": "./test" + }, + "types": "./docs/types", + "scripts": {}, + "homepage": "https://github.com/stdlib-js/stdlib", + "repository": { + "type": "git", + "url": "git://github.com/stdlib-js/stdlib.git" + }, + "bugs": { + "url": "https://github.com/stdlib-js/stdlib/issues" + }, + "dependencies": {}, + "devDependencies": {}, + "engines": { + "node": ">=0.10.0", + "npm": ">2.7.0" + }, + "os": [ + "aix", + "darwin", + "freebsd", + "linux", + "macos", + "openbsd", + "sunos", + "win32", + "windows" + ], + "keywords": [ + "stdlib", + "stdassert", + "assertion", + "assert", + "utilities", + "utility", + "utils", + "util", + "booleanarray", + "boolean", + "uint", + "uint8", + "ieee754", + "typed", + "typed array", + "typed-array", + "array", + "is", + "isarray", + "istypedarray", + "type", + "check", + "validate", + "valid", + "isvalid", + "test" + ] +} diff --git a/lib/node_modules/@stdlib/assert/is-booleanarray/test/test.js b/lib/node_modules/@stdlib/assert/is-booleanarray/test/test.js new file mode 100644 index 000000000000..b951637e8f7e --- /dev/null +++ b/lib/node_modules/@stdlib/assert/is-booleanarray/test/test.js @@ -0,0 +1,84 @@ +/** +* @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 Int8Array = require( '@stdlib/array/int8' ); +var Uint8Array = require( '@stdlib/array/uint8' ); +var Uint8ClampedArray = require( '@stdlib/array/uint8c' ); +var Int16Array = require( '@stdlib/array/int16' ); +var Uint16Array = require( '@stdlib/array/uint16' ); +var Int32Array = require( '@stdlib/array/int32' ); +var Uint32Array = require( '@stdlib/array/uint32' ); +var Float32Array = require( '@stdlib/array/float32' ); +var Float64Array = require( '@stdlib/array/float64' ); +var Complex128Array = require( '@stdlib/array/complex128' ); +var Complex64Array = require( '@stdlib/array/complex64' ); +var BooleanArray = require( '@stdlib/array/bool' ); +var isBooleanArray = require( './../lib' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof isBooleanArray, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function returns `true` if provided a BooleanArray', function test( t ) { + t.strictEqual( isBooleanArray( new BooleanArray( 10 ) ), true, 'returns true' ); + t.end(); +}); + +tape( 'the function returns `false` if not provided a BooleanArray', function test( t ) { + var values; + var i; + + values = [ + '5', + 5, + NaN, + true, + null, + void 0, + [], + {}, + function noop() {}, + new Array( 10 ), + new Float64Array( 10 ), + new Float32Array( 10 ), + new Uint32Array( 10 ), + new Int32Array( 10 ), + new Uint16Array( 10 ), + new Int16Array( 10 ), + new Uint8Array( 10 ), + new Int8Array( 10 ), + new Uint8ClampedArray( 10 ), + new Complex128Array( 10 ), + new Complex64Array( 10 ) + ]; + + for ( i = 0; i < values.length; i++ ) { + t.strictEqual( isBooleanArray( values[i] ), false, 'returns false when provided ' + values[i] ); + } + t.end(); +}); From f0c5053da9614e59f839182eb70d2236f99cec76 Mon Sep 17 00:00:00 2001 From: Athan Reines Date: Wed, 5 Jun 2024 01:51:05 -0700 Subject: [PATCH 2/9] docs: fix missing require statement --- .../@stdlib/assert/is-booleanarray/docs/types/index.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/node_modules/@stdlib/assert/is-booleanarray/docs/types/index.d.ts b/lib/node_modules/@stdlib/assert/is-booleanarray/docs/types/index.d.ts index b4a071af9149..34271f2807b6 100644 --- a/lib/node_modules/@stdlib/assert/is-booleanarray/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/assert/is-booleanarray/docs/types/index.d.ts @@ -29,6 +29,8 @@ import { BooleanArray } from '@stdlib/types/array'; * @returns boolean indicating whether value is a BooleanArray * * @example +* var BooleanArray = require( '@stdlib/array/bool' ); +* * var bool = isBooleanArray( new BooleanArray( 10 ) ); * // returns true * From 574c01f2c79a1d15cf832d70fe80e763585ab049 Mon Sep 17 00:00:00 2001 From: Athan Reines Date: Wed, 5 Jun 2024 01:52:40 -0700 Subject: [PATCH 3/9] docs: update returns description --- .../@stdlib/assert/is-booleanarray/docs/types/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/assert/is-booleanarray/docs/types/index.d.ts b/lib/node_modules/@stdlib/assert/is-booleanarray/docs/types/index.d.ts index 34271f2807b6..eb2baf3e7b74 100644 --- a/lib/node_modules/@stdlib/assert/is-booleanarray/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/assert/is-booleanarray/docs/types/index.d.ts @@ -26,7 +26,7 @@ import { BooleanArray } from '@stdlib/types/array'; * Tests if a value is a BooleanArray. * * @param value - value to test -* @returns boolean indicating whether value is a BooleanArray +* @returns boolean indicating whether a value is a BooleanArray * * @example * var BooleanArray = require( '@stdlib/array/bool' ); From dc74e9950b9d2e1ad2a9a299801ab94eeccfad07 Mon Sep 17 00:00:00 2001 From: Athan Reines Date: Wed, 5 Jun 2024 01:53:42 -0700 Subject: [PATCH 4/9] docs: update description --- lib/node_modules/@stdlib/assert/is-booleanarray/docs/repl.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/assert/is-booleanarray/docs/repl.txt b/lib/node_modules/@stdlib/assert/is-booleanarray/docs/repl.txt index de173a0ca858..94de4cb2164c 100644 --- a/lib/node_modules/@stdlib/assert/is-booleanarray/docs/repl.txt +++ b/lib/node_modules/@stdlib/assert/is-booleanarray/docs/repl.txt @@ -10,7 +10,7 @@ Returns ------- bool: boolean - Boolean indicating whether value is a BooleanArray. + Boolean indicating whether a value is a BooleanArray. Examples -------- From ef397253ae0b0755066bac3269143e5bb7aacd80 Mon Sep 17 00:00:00 2001 From: Athan Reines Date: Wed, 5 Jun 2024 01:55:00 -0700 Subject: [PATCH 5/9] docs: fix missing import --- lib/node_modules/@stdlib/assert/is-booleanarray/lib/index.js | 1 + lib/node_modules/@stdlib/assert/is-booleanarray/lib/main.js | 2 ++ 2 files changed, 3 insertions(+) diff --git a/lib/node_modules/@stdlib/assert/is-booleanarray/lib/index.js b/lib/node_modules/@stdlib/assert/is-booleanarray/lib/index.js index 4ea3fe2e925b..ff6200e0364e 100644 --- a/lib/node_modules/@stdlib/assert/is-booleanarray/lib/index.js +++ b/lib/node_modules/@stdlib/assert/is-booleanarray/lib/index.js @@ -24,6 +24,7 @@ * @module @stdlib/assert/is-booleanarray * * @example +* var BooleanArray = require( '@stdlib/array/bool' ); * var isBooleanArray = require( '@stdlib/assert/is-booleanarray' ); * * var bool = isBooleanArray( new BooleanArray( 10 ) ); diff --git a/lib/node_modules/@stdlib/assert/is-booleanarray/lib/main.js b/lib/node_modules/@stdlib/assert/is-booleanarray/lib/main.js index feb0755210d9..af484ec5545d 100644 --- a/lib/node_modules/@stdlib/assert/is-booleanarray/lib/main.js +++ b/lib/node_modules/@stdlib/assert/is-booleanarray/lib/main.js @@ -33,6 +33,8 @@ var constructorName = require( '@stdlib/utils/constructor-name' ); * @returns {boolean} boolean indicating whether value is a BooleanArray * * @example +* var BooleanArray = require( '@stdlib/array/bool' ); +* * var bool = isBooleanArray( new BooleanArray( 10 ) ); * // returns true * From f2123acf4f43f1d32437665b8bb30e3150ff5dd4 Mon Sep 17 00:00:00 2001 From: Athan Reines Date: Wed, 5 Jun 2024 01:55:23 -0700 Subject: [PATCH 6/9] docs: update description --- lib/node_modules/@stdlib/assert/is-booleanarray/lib/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/assert/is-booleanarray/lib/main.js b/lib/node_modules/@stdlib/assert/is-booleanarray/lib/main.js index af484ec5545d..85290e8b5fd2 100644 --- a/lib/node_modules/@stdlib/assert/is-booleanarray/lib/main.js +++ b/lib/node_modules/@stdlib/assert/is-booleanarray/lib/main.js @@ -30,7 +30,7 @@ var constructorName = require( '@stdlib/utils/constructor-name' ); * Tests if a value is a Complex64Array. * * @param {*} value - value to test -* @returns {boolean} boolean indicating whether value is a BooleanArray +* @returns {boolean} boolean indicating whether a value is a BooleanArray * * @example * var BooleanArray = require( '@stdlib/array/bool' ); From 2179103071ccc45d9a87d6643a7bade80d5648aa Mon Sep 17 00:00:00 2001 From: Athan Reines Date: Wed, 5 Jun 2024 01:56:31 -0700 Subject: [PATCH 7/9] test: update test messages --- lib/node_modules/@stdlib/assert/is-booleanarray/test/test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/assert/is-booleanarray/test/test.js b/lib/node_modules/@stdlib/assert/is-booleanarray/test/test.js index b951637e8f7e..dfd3007212b9 100644 --- a/lib/node_modules/@stdlib/assert/is-booleanarray/test/test.js +++ b/lib/node_modules/@stdlib/assert/is-booleanarray/test/test.js @@ -45,7 +45,7 @@ tape( 'main export is a function', function test( t ) { }); tape( 'the function returns `true` if provided a BooleanArray', function test( t ) { - t.strictEqual( isBooleanArray( new BooleanArray( 10 ) ), true, 'returns true' ); + t.strictEqual( isBooleanArray( new BooleanArray( 10 ) ), true, 'returns expected value' ); t.end(); }); @@ -78,7 +78,7 @@ tape( 'the function returns `false` if not provided a BooleanArray', function te ]; for ( i = 0; i < values.length; i++ ) { - t.strictEqual( isBooleanArray( values[i] ), false, 'returns false when provided ' + values[i] ); + t.strictEqual( isBooleanArray( values[i] ), false, 'returns expected value when provided ' + values[i] ); } t.end(); }); From 07e7a4ab27c86d57a2947f34b773e61ea374af52 Mon Sep 17 00:00:00 2001 From: Athan Reines Date: Wed, 5 Jun 2024 01:57:31 -0700 Subject: [PATCH 8/9] docs: fix copy-paste error and remove related --- .../@stdlib/assert/is-booleanarray/README.md | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/lib/node_modules/@stdlib/assert/is-booleanarray/README.md b/lib/node_modules/@stdlib/assert/is-booleanarray/README.md index a48820aec549..1f19f41fd9c7 100644 --- a/lib/node_modules/@stdlib/assert/is-booleanarray/README.md +++ b/lib/node_modules/@stdlib/assert/is-booleanarray/README.md @@ -30,7 +30,7 @@ limitations under the License. var isBooleanArray = require( '@stdlib/assert/is-booleanarray' ); ``` -#### isComplex64Array( value ) +#### isBooleanArray( value ) Tests if a value is a [`BooleanArray`][@stdlib/array/bool]. @@ -123,12 +123,6 @@ bool = isBooleanArray( null ); @@ -139,12 +133,6 @@ bool = isBooleanArray( null ); [@stdlib/array/bool]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/bool - - -[@stdlib/assert/is-boolean]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/assert/is-boolean - - - From 07df6f7cc7dbbe402e8ca935f84929b03b95030c Mon Sep 17 00:00:00 2001 From: Athan Reines Date: Wed, 5 Jun 2024 01:58:32 -0700 Subject: [PATCH 9/9] chore: update keywords --- lib/node_modules/@stdlib/assert/is-booleanarray/package.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/node_modules/@stdlib/assert/is-booleanarray/package.json b/lib/node_modules/@stdlib/assert/is-booleanarray/package.json index c93f9fb058e1..12b184303d82 100644 --- a/lib/node_modules/@stdlib/assert/is-booleanarray/package.json +++ b/lib/node_modules/@stdlib/assert/is-booleanarray/package.json @@ -59,9 +59,6 @@ "util", "booleanarray", "boolean", - "uint", - "uint8", - "ieee754", "typed", "typed array", "typed-array",