diff --git a/CHANGELOG.md b/CHANGELOG.md index 7458083e..2d32357f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@
-## Unreleased (2024-07-13) +## Unreleased (2024-07-14)
@@ -2436,6 +2436,7 @@ A total of 13 people contributed to this release. Thank you to the following con
+- [`1cba41b`](https://github.com/stdlib-js/stdlib/commit/1cba41b45734d186a349d7987028307144faf4a3) - **docs:** update examples _(by Athan Reines)_ - [`ce3ad9a`](https://github.com/stdlib-js/stdlib/commit/ce3ad9a98468829b294708ca188ec669056e58ed) - **feat:** add `keys`, `values`, and `with` methods to `array/bool` [(#2590)](https://github.com/stdlib-js/stdlib/pull/2590) _(by Jaysukh Makvana)_ - [`2cf1a24`](https://github.com/stdlib-js/stdlib/commit/2cf1a248120648c46ca4e5bd6535c62a6f3eba6e) - **docs:** update namespace TypeScript declarations [(#2582)](https://github.com/stdlib-js/stdlib/pull/2582) _(by stdlib-bot, Athan Reines)_ - [`66dce03`](https://github.com/stdlib-js/stdlib/commit/66dce034698fdbd71248cad9c7d277ac97cdf0ae) - **feat:** add boolean dtype support to `array/min-dtype` [(#2556)](https://github.com/stdlib-js/stdlib/pull/2556) _(by Jaysukh Makvana, Athan Reines)_ diff --git a/dtypes/README.md b/dtypes/README.md index 48a12b0b..c34ad717 100644 --- a/dtypes/README.md +++ b/dtypes/README.md @@ -114,25 +114,18 @@ var out = dtypes( 'floating_point_and_generic' ); ```javascript -var indexOf = require( '@stdlib/utils/index-of' ); +var contains = require( '@stdlib/array/base/assert/contains' ).factory; var dtypes = require( '@stdlib/array/dtypes' ); -var DTYPES = dtypes(); - -function isdtype( str ) { - if ( indexOf( DTYPES, str ) === -1 ) { - return false; - } - return true; -} +var isdtype = contains( dtypes() ); var bool = isdtype( 'float64' ); // returns true -bool = isdtype( 'int16' ); +bool = isdtype( 'int8' ); // returns true -bool = isdtype( 'uint8' ); +bool = isdtype( 'uint16' ); // returns true bool = isdtype( 'beep' ); diff --git a/dtypes/examples/index.js b/dtypes/examples/index.js index dffc9666..b1b0c01b 100644 --- a/dtypes/examples/index.js +++ b/dtypes/examples/index.js @@ -18,17 +18,10 @@ 'use strict'; -var indexOf = require( '@stdlib/utils/index-of' ); +var contains = require( './../../base/assert/contains' ).factory; var dtypes = require( './../lib' ); -var DTYPES = dtypes(); - -function isdtype( str ) { - if ( indexOf( DTYPES, str ) === -1 ) { - return false; - } - return true; -} +var isdtype = contains( dtypes() ); var bool = isdtype( 'float64' ); console.log( bool );