Skip to content

Commit dbf41e1

Browse files
committed
Auto-generated commit
1 parent db46429 commit dbf41e1

13 files changed

Lines changed: 63 additions & 46 deletions

File tree

.github/.keepalive

Lines changed: 0 additions & 1 deletion
This file was deleted.

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ package.json.copy
2525
###############
2626
build/
2727
downloads/
28+
plans/
2829
reports/
2930
tmp/
3031

@@ -175,6 +176,10 @@ acs-*.bib
175176
*.ind
176177
*.ist
177178

179+
# Git #
180+
#######
181+
.worktrees
182+
178183
# Visual Studio #
179184
#################
180185
.vscode/

CHANGELOG.md

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

7-
## Unreleased (2026-04-22)
7+
## Unreleased (2026-05-12)
88

99
<section class="commits">
1010

1111
### Commits
1212

1313
<details>
1414

15+
- [`26e94d6`](https://github.com/stdlib-js/stdlib/commit/26e94d6c922b95b2df87e603009c8de1d6f5e773) - **refactor:** update to avoid usage of global symbol _(by Athan Reines)_
1516
- [`67c0a20`](https://github.com/stdlib-js/stdlib/commit/67c0a2044e515ea6733765a48be54f09ea749d8f) - **bench:** refactor to use string interpolation in `@stdlib/assert` [(#11398)](https:-/github.com/stdlib-js/stdlib/pull/11398) _(by Karan Anand)_
1617

1718
</details>
@@ -24,8 +25,9 @@
2425

2526
### Contributors
2627

27-
A total of 1 person contributed to this release. Thank you to this contributor:
28+
A total of 2 people contributed to this release. Thank you to the following contributors:
2829

30+
- Athan Reines
2931
- Karan Anand
3032

3133
</section>

README.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ limitations under the License.
3333

3434
[![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] <!-- [![dependencies][dependencies-image]][dependencies-url] -->
3535

36-
> Test if a value is a [Float16Array][mdn-float16array].
36+
> Test if a value is a [Float16Array][@stdlib/array/float16].
3737
3838
<section class="installation">
3939

@@ -65,13 +65,13 @@ var isFloat16Array = require( '@stdlib/assert-is-float16array' );
6565

6666
#### isFloat16Array( value )
6767

68-
Tests if a value is a [`Float16Array`][mdn-float16array].
69-
70-
<!-- TODO: update example once `array/float16` is added -->
68+
Tests if a value is a [`Float16Array`][@stdlib/array/float16].
7169

7270
```javascript
73-
var bool = isFloat16Array( [] );
74-
// returns false
71+
var Float16Array = require( '@stdlib/array-float16' );
72+
73+
var bool = isFloat16Array( new Float16Array( 10 ) );
74+
// returns true
7575
```
7676

7777
</section>
@@ -92,11 +92,15 @@ var Int16Array = require( '@stdlib/array-int16' );
9292
var Uint16Array = require( '@stdlib/array-uint16' );
9393
var Int32Array = require( '@stdlib/array-int32' );
9494
var Uint32Array = require( '@stdlib/array-uint32' );
95+
var Float16Array = require( '@stdlib/array-float16' );
9596
var Float32Array = require( '@stdlib/array-float32' );
9697
var Float64Array = require( '@stdlib/array-float64' );
9798
var isFloat16Array = require( '@stdlib/assert-is-float16array' );
9899

99-
var bool = isFloat16Array( new Int8Array( 10 ) );
100+
var bool = isFloat16Array( new Float16Array( 10 ) );
101+
// returns true
102+
103+
bool = isFloat16Array( new Int8Array( 10 ) );
100104
// returns false
101105

102106
bool = isFloat16Array( new Uint8Array( 10 ) );
@@ -217,7 +221,7 @@ Copyright &copy; 2016-2026. The Stdlib [Authors][stdlib-authors].
217221

218222
[stdlib-license]: https://raw.githubusercontent.com/stdlib-js/assert-is-float16array/main/LICENSE
219223

220-
[mdn-float16array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float16Array
224+
[@stdlib/array/float16]: https://github.com/stdlib-js/array-float16
221225

222226
</section>
223227

benchmark/benchmark.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ var Int16Array = require( '@stdlib/array-int16' );
2828
var Uint16Array = require( '@stdlib/array-uint16' );
2929
var Int32Array = require( '@stdlib/array-int32' );
3030
var Uint32Array = require( '@stdlib/array-uint32' );
31+
var Float16Array = require( '@stdlib/array-float16' );
3132
var Float32Array = require( '@stdlib/array-float32' );
3233
var Float64Array = require( '@stdlib/array-float64' );
3334
var isBoolean = require( '@stdlib/assert-is-boolean' ).isPrimitive;
@@ -36,15 +37,6 @@ var pkg = require( './../package.json' ).name;
3637
var isFloat16Array = require( './../lib' );
3738

3839

39-
// VARIABLES //
40-
41-
// TODO: remove once `array/float16` is added
42-
var Float16Array = ( typeof Float16Array === 'function' ) ? Float16Array : null; // eslint-disable-line no-use-before-define
43-
var opts = {
44-
'skip': ( Float16Array === null )
45-
};
46-
47-
4840
// MAIN //
4941

5042
bench( pkg, function benchmark( b ) {
@@ -79,7 +71,7 @@ bench( pkg, function benchmark( b ) {
7971
b.end();
8072
});
8173

82-
bench( format( '%s::true', pkg ), opts, function benchmark( b ) {
74+
bench( format( '%s::true', pkg ), function benchmark( b ) {
8375
var values;
8476
var bool;
8577
var i;

dist/index.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/repl.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@
1414

1515
Examples
1616
--------
17-
// TODO: update to use `array/float16` once added
18-
> var bool = {{alias}}( new {{alias:@stdlib/array/float32}}( 10 ) )
19-
false
17+
> var bool = {{alias}}( new {{alias:@stdlib/array/float16}}( 10 ) )
18+
true
2019
> bool = {{alias}}( [] )
2120
false
2221

docs/types/index.d.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818

1919
// TypeScript Version: 4.1
2020

21+
/// <reference types="@stdlib/types"/>
22+
23+
import { Float16Array } from '@stdlib/types/array';
24+
2125
/**
2226
* Tests if a value is a Float16Array.
2327
*
@@ -34,7 +38,7 @@
3438
* var bool = isFloat16Array( [] );
3539
* // returns false
3640
*/
37-
declare function isFloat16Array( value: any ): boolean; // TODO: replace with `value is Float16Array` once `array/float16` added
41+
declare function isFloat16Array( value: any ): value is Float16Array;
3842

3943

4044
// EXPORTS //

examples/index.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,16 @@ var Int16Array = require( '@stdlib/array-int16' );
2525
var Uint16Array = require( '@stdlib/array-uint16' );
2626
var Int32Array = require( '@stdlib/array-int32' );
2727
var Uint32Array = require( '@stdlib/array-uint32' );
28+
var Float16Array = require( '@stdlib/array-float16' );
2829
var Float32Array = require( '@stdlib/array-float32' );
2930
var Float64Array = require( '@stdlib/array-float64' );
3031
var isFloat16Array = require( './../lib' );
3132

32-
// TODO: add example with Float16Array once `array/float16` is added
33+
var bool = isFloat16Array( new Float16Array( 10 ) );
34+
console.log( bool );
35+
// => true
3336

34-
var bool = isFloat16Array( new Int8Array( 10 ) );
37+
bool = isFloat16Array( new Int8Array( 10 ) );
3538
console.log( bool );
3639
// => false
3740

0 commit comments

Comments
 (0)