Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Jul 14, 2024
1 parent c3fcfc9 commit 5904cbf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 21 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<section class="release" id="unreleased">

## Unreleased (2024-07-13)
## Unreleased (2024-07-14)

<section class="packages">

Expand Down Expand Up @@ -2436,6 +2436,7 @@ A total of 13 people contributed to this release. Thank you to the following con

<details>

- [`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)_
Expand Down
15 changes: 4 additions & 11 deletions dtypes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,25 +114,18 @@ var out = dtypes( 'floating_point_and_generic' );
<!-- eslint no-undef: "error" -->

```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' );
Expand Down
11 changes: 2 additions & 9 deletions dtypes/examples/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down

0 comments on commit 5904cbf

Please sign in to comment.