File tree Expand file tree Collapse file tree 5 files changed +11
-23
lines changed
Expand file tree Collapse file tree 5 files changed +11
-23
lines changed Original file line number Diff line number Diff line change 44
55<section class =" release " id =" unreleased " >
66
7- ## Unreleased (2024-06-13 )
7+ ## Unreleased (2024-07-14 )
88
99<section class =" features " >
1010
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 >
Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ Pushpendra Chandravanshi <pushpendrachandravanshi4@gmail.com>
6363Raunak Kumar Gupta <raunakmodanwal321@gmail.com>
6464Rejoan Sardar <119718513+Rejoan-Sardar@users.noreply.github.com>
6565Ricky Reusser <rsreusser@gmail.com>
66+ Ridam Garg <67867319+RidamGarg@users.noreply.github.com>
6667Robert Gislason <gztown2216@yahoo.com>
6768Roman Stetsyk <25715951+romanstetsyk@users.noreply.github.com>
6869Rutam <138517416+performant23@users.noreply.github.com>
@@ -75,7 +76,7 @@ Shraddheya Shendre <shendreshraddheya@gmail.com>
7576Shubh Mehta <93862397+Shubh942@users.noreply.github.com>
7677Shubham Mishra <shubh622005@gmail.com>
7778Sivam Das <100067002+Sivam2313@users.noreply.github.com>
78- Snehil Shah <130062020+Snehil-Shah@users.noreply.github .com>
79+ Snehil Shah <snehilshah.989@gmail .com>
7980Soumajit Chatterjee <121816890+soumajit23@users.noreply.github.com>
8081Spandan Barve <contact@marsian.dev>
8182Stephannie Jiménez Gacha <steff456@hotmail.com>
Original file line number Diff line number Diff 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 ;
151151var 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
162155var 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
171164bool = isdtype ( ' beep' );
Original file line number Diff line number Diff line change 1818
1919'use strict' ;
2020
21- var indexOf = require ( '@stdlib/utils-index-of ' ) ;
21+ var contains = require ( '@stdlib/array-base-assert-contains ' ) . factory ;
2222var 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
3326var bool = isdtype ( 'float64' ) ;
3427console . log ( bool ) ;
Original file line number Diff line number Diff line change 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" ,
You can’t perform that action at this time.
0 commit comments