Skip to content

Commit cf4a24c

Browse files
committed
Auto-generated commit
1 parent fcd9c66 commit cf4a24c

File tree

6 files changed

+31
-5
lines changed

6 files changed

+31
-5
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
### Features
1212

13+
- [`06bd6e0`](https://github.com/stdlib-js/stdlib/commit/06bd6e03ba8aae02b35f9a4da6724d686cf34da4) - add support for non-string data types
14+
- [`be5553d`](https://github.com/stdlib-js/stdlib/commit/be5553d64471b61353e42499666ab50502ab136b) - add support for non-string data types
1315
- [`1908bae`](https://github.com/stdlib-js/stdlib/commit/1908bae6fe4852798ed12f620b59af50f762f2e5) - add support for `struct` and `DataType` dtype values
1416
- [`ae21126`](https://github.com/stdlib-js/stdlib/commit/ae2112615cd460c39161a41c32d18b7ab600c885) - add support for struct arrays
1517
- [`f660e38`](https://github.com/stdlib-js/stdlib/commit/f660e38225095ed8c07324924ff37098d6f96851) - add support for `struct` and `DataType` dtype values
@@ -558,6 +560,8 @@ A total of 24 issues were closed in this release:
558560

559561
<details>
560562

563+
- [`06bd6e0`](https://github.com/stdlib-js/stdlib/commit/06bd6e03ba8aae02b35f9a4da6724d686cf34da4) - **feat:** add support for non-string data types _(by Athan Reines)_
564+
- [`be5553d`](https://github.com/stdlib-js/stdlib/commit/be5553d64471b61353e42499666ab50502ab136b) - **feat:** add support for non-string data types _(by Athan Reines)_
561565
- [`3cb98f3`](https://github.com/stdlib-js/stdlib/commit/3cb98f3aa714b97cb714d45688421e9ac416d31c) - **test:** add tests for full branch coverage _(by Athan Reines)_
562566
- [`71a48b0`](https://github.com/stdlib-js/stdlib/commit/71a48b0b0ad86ba66a8109852f3b305e8caa06a0) - **refactor:** guard against `null` and `undefined` input values _(by Athan Reines)_
563567
- [`3ab207e`](https://github.com/stdlib-js/stdlib/commit/3ab207e1606e1b763451994fcf50dfcfc8e7f135) - **test:** update require path _(by Athan Reines)_

base/assert/is-boolean-data-type/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ var isBooleanDataType = require( '@stdlib/ndarray/base/assert/is-boolean-data-ty
4242

4343
#### isBooleanDataType( value )
4444

45-
Tests if an input `value` is a supported ndarray boolean [data type][@stdlib/ndarray/dtypes].
45+
Tests if an input value is a supported ndarray boolean [data type][@stdlib/ndarray/dtypes].
4646

4747
```javascript
4848
var bool = isBooleanDataType( 'bool' );

base/assert/is-boolean-data-type/lib/main.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ var contains = require( '@stdlib/array/base/assert/contains' ).factory;
2424
var dtypes = require( './../../../../dtypes' );
2525

2626

27+
// VARIABLES //
28+
29+
var isDataType = contains( dtypes( 'boolean' ) );
30+
31+
2732
// MAIN //
2833

2934
/**
@@ -74,7 +79,9 @@ var dtypes = require( './../../../../dtypes' );
7479
* bool = isBooleanDataType( 'foo' );
7580
* // returns false
7681
*/
77-
var isBooleanDataType = contains( dtypes( 'boolean' ) );
82+
function isBooleanDataType( v ) {
83+
return isDataType( String( v ) );
84+
}
7885

7986

8087
// EXPORTS //

base/assert/is-boolean-data-type/test/test.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
// MODULES //
2222

2323
var tape = require( 'tape' );
24+
var DataType = require( './../../../../dtype-ctor' );
2425
var isBooleanDataType = require( './../lib' );
2526

2627

@@ -38,7 +39,8 @@ tape( 'the function returns `true` if provided a supported ndarray boolean data
3839
var i;
3940

4041
values = [
41-
'bool'
42+
'bool',
43+
new DataType( 'bool' )
4244
];
4345
for ( i = 0; i < values.length; i++ ) {
4446
bool = isBooleanDataType( values[ i ] );
@@ -68,6 +70,8 @@ tape( 'the function returns `false` if not provided a supported ndarray boolean
6870
'int8',
6971
'generic',
7072

73+
new DataType( 'generic' ),
74+
7175
// Unsupported dtypes:
7276
'float',
7377
'int',

base/assert/is-boolean-index-data-type/lib/main.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ var contains = require( '@stdlib/array/base/assert/contains' ).factory;
2424
var dtypes = require( './../../../../dtypes' );
2525

2626

27+
// VARIABLES //
28+
29+
var isDataType = contains( dtypes( 'boolean_index' ) );
30+
31+
2732
// MAIN //
2833

2934
/**
@@ -71,7 +76,9 @@ var dtypes = require( './../../../../dtypes' );
7176
* bool = isBooleanIndexDataType( 'foo' );
7277
* // returns false
7378
*/
74-
var isBooleanIndexDataType = contains( dtypes( 'boolean_index' ) );
79+
function isBooleanIndexDataType( v ) {
80+
return isDataType( String( v ) );
81+
}
7582

7683

7784
// EXPORTS //

base/assert/is-boolean-index-data-type/test/test.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
// MODULES //
2222

2323
var tape = require( 'tape' );
24+
var DataType = require( './../../../../dtype-ctor' );
2425
var isBooleanIndexDataType = require( './../lib' );
2526

2627

@@ -38,7 +39,8 @@ tape( 'the function returns `true` if provided a supported ndarray boolean index
3839
var i;
3940

4041
values = [
41-
'bool'
42+
'bool',
43+
new DataType( 'bool' )
4244
];
4345
for ( i = 0; i < values.length; i++ ) {
4446
bool = isBooleanIndexDataType( values[ i ] );
@@ -68,6 +70,8 @@ tape( 'the function returns `false` if not provided a supported ndarray boolean
6870
'uint8c',
6971
'generic',
7072

73+
new DataType( 'generic' ),
74+
7175
// Unsupported dtypes:
7276
'float',
7377
'int',

0 commit comments

Comments
 (0)