Skip to content

Commit d7b85fd

Browse files
committed
Auto-generated commit
1 parent d51cf02 commit d7b85fd

File tree

5 files changed

+11
-23
lines changed

5 files changed

+11
-23
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
<section class="release" id="unreleased">
66

7-
## Unreleased (2024-06-13)
7+
## Unreleased (2024-07-14)
88

99
<section class="features">
1010

@@ -22,6 +22,7 @@
2222

2323
<details>
2424

25+
- [`1cba41b`](https://github.com/stdlib-js/stdlib/commit/1cba41b45734d186a349d7987028307144faf4a3) - **docs:** update examples _(by Athan Reines)_
2526
- [`c417923`](https://github.com/stdlib-js/stdlib/commit/c4179233cb2de5ffaa8c59b3910e14de12414483) - **feat:** add boolean dtype support in `array/dtypes` [(#2307)](https://github.com/stdlib-js/stdlib/pull/2307) _(by Jaysukh Makvana, Athan Reines)_
2627

2728
</details>

CONTRIBUTORS

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ Pushpendra Chandravanshi <pushpendrachandravanshi4@gmail.com>
6363
Raunak Kumar Gupta <raunakmodanwal321@gmail.com>
6464
Rejoan Sardar <119718513+Rejoan-Sardar@users.noreply.github.com>
6565
Ricky Reusser <rsreusser@gmail.com>
66+
Ridam Garg <67867319+RidamGarg@users.noreply.github.com>
6667
Robert Gislason <gztown2216@yahoo.com>
6768
Roman Stetsyk <25715951+romanstetsyk@users.noreply.github.com>
6869
Rutam <138517416+performant23@users.noreply.github.com>
@@ -75,7 +76,7 @@ Shraddheya Shendre <shendreshraddheya@gmail.com>
7576
Shubh Mehta <93862397+Shubh942@users.noreply.github.com>
7677
Shubham Mishra <shubh622005@gmail.com>
7778
Sivam Das <100067002+Sivam2313@users.noreply.github.com>
78-
Snehil Shah <130062020+Snehil-Shah@users.noreply.github.com>
79+
Snehil Shah <snehilshah.989@gmail.com>
7980
Soumajit Chatterjee <121816890+soumajit23@users.noreply.github.com>
8081
Spandan Barve <contact@marsian.dev>
8182
Stephannie Jiménez Gacha <steff456@hotmail.com>

README.md

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -147,25 +147,18 @@ var out = dtypes( 'floating_point_and_generic' );
147147
<!-- eslint no-undef: "error" -->
148148

149149
```javascript
150-
var indexOf = require( '@stdlib/utils-index-of' );
150+
var contains = require( '@stdlib/array-base-assert-contains' ).factory;
151151
var dtypes = require( '@stdlib/array-dtypes' );
152152

153-
var DTYPES = dtypes();
154-
155-
function isdtype( str ) {
156-
if ( indexOf( DTYPES, str ) === -1 ) {
157-
return false;
158-
}
159-
return true;
160-
}
153+
var isdtype = contains( dtypes() );
161154

162155
var bool = isdtype( 'float64' );
163156
// returns true
164157

165-
bool = isdtype( 'int16' );
158+
bool = isdtype( 'int8' );
166159
// returns true
167160

168-
bool = isdtype( 'uint8' );
161+
bool = isdtype( 'uint16' );
169162
// returns true
170163

171164
bool = isdtype( 'beep' );

examples/index.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,10 @@
1818

1919
'use strict';
2020

21-
var indexOf = require( '@stdlib/utils-index-of' );
21+
var contains = require( '@stdlib/array-base-assert-contains' ).factory;
2222
var dtypes = require( './../lib' );
2323

24-
var DTYPES = dtypes();
25-
26-
function isdtype( str ) {
27-
if ( indexOf( DTYPES, str ) === -1 ) {
28-
return false;
29-
}
30-
return true;
31-
}
24+
var isdtype = contains( dtypes() );
3225

3326
var bool = isdtype( 'float64' );
3427
console.log( bool );

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@
4141
"@stdlib/types": "^0.3.2"
4242
},
4343
"devDependencies": {
44+
"@stdlib/array-base-assert-contains": "^0.2.1",
4445
"@stdlib/assert-is-string-array": "^0.2.1",
45-
"@stdlib/utils-index-of": "^0.2.1",
4646
"tape": "git+https://github.com/kgryte/tape.git#fix/globby",
4747
"istanbul": "^0.4.1",
4848
"tap-min": "git+https://github.com/Planeshifter/tap-min.git",

0 commit comments

Comments
 (0)