Skip to content

Commit aa4b6b3

Browse files
committed
Auto-generated commit
1 parent d86c36d commit aa4b6b3

12 files changed

Lines changed: 714 additions & 2 deletions

File tree

‎.github/.keepalive‎

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

‎CHANGELOG.md‎

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

7-
## Unreleased (2026-08-21)
7+
## Unreleased (2026-08-26)
88

99
<section class="features">
1010

1111
### Features
1212

13+
- [`3af8898`](https://github.com/stdlib-js/stdlib/commit/3af8898d448b21e26b934471590619b633f127b5) - add `assert/is-int64array`
1314
- [`506ec9c`](https://github.com/stdlib-js/stdlib/commit/506ec9c975c2ead49e3c07353fbdfd8775ebbc5e) - update `assert` TypeScript declarations [(#14039)](https://github.com/stdlib-js/stdlib/pull/14039)
1415
- [`0659b95`](https://github.com/stdlib-js/stdlib/commit/0659b95f9401a4fd560eff1880a87fa9e8e02ab4) - add `hasPromiseSupport` to namespace
1516
- [`258e932`](https://github.com/stdlib-js/stdlib/commit/258e932e90c1a9c66b401f908028846ef4d05005) - add `assert/has-promise-support` [(#13974)](https://github.com/stdlib-js/stdlib/pull/13974)
@@ -42,6 +43,7 @@ A total of 5 issues were closed in this release:
4243

4344
<details>
4445

46+
- [`3af8898`](https://github.com/stdlib-js/stdlib/commit/3af8898d448b21e26b934471590619b633f127b5) - **feat:** add `assert/is-int64array` _(by Athan Reines)_
4547
- [`ec0202a`](https://github.com/stdlib-js/stdlib/commit/ec0202a035e395dae873b7b6efc12e0c0ca6caac) - **docs:** update namespace table of contents [(#14083)](https://github.com/stdlib-js/stdlib/pull/14083) _(by stdlib-bot)_
4648
- [`506ec9c`](https://github.com/stdlib-js/stdlib/commit/506ec9c975c2ead49e3c07353fbdfd8775ebbc5e) - **feat:** update `assert` TypeScript declarations [(#14039)](https://github.com/stdlib-js/stdlib/pull/14039) _(by stdlib-bot)_
4749
- [`b149fa7`](https://github.com/stdlib-js/stdlib/commit/b149fa757b98c9bc6050f91c5415c3e0a607f83d) - **chore:** clean-up [(#14014)](https://github.com/stdlib-js/stdlib/pull/14014) _(by Philipp Burckhardt, Athan Reines)_

‎is-int64array/README.md‎

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
<!--
2+
3+
@license Apache-2.0
4+
5+
Copyright (c) 2026 The Stdlib Authors.
6+
7+
Licensed under the Apache License, Version 2.0 (the "License");
8+
you may not use this file except in compliance with the License.
9+
You may obtain a copy of the License at
10+
11+
http://www.apache.org/licenses/LICENSE-2.0
12+
13+
Unless required by applicable law or agreed to in writing, software
14+
distributed under the License is distributed on an "AS IS" BASIS,
15+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
See the License for the specific language governing permissions and
17+
limitations under the License.
18+
19+
-->
20+
21+
# isInt64Array
22+
23+
> Test if a value is an [Int64Array][@stdlib/array/int64].
24+
25+
<section class="usage">
26+
27+
## Usage
28+
29+
```javascript
30+
var isInt64Array = require( '@stdlib/assert/is-int64array' );
31+
```
32+
33+
#### isInt64Array( value )
34+
35+
Tests if a value is an [`Int64Array`][@stdlib/array/int64].
36+
37+
```javascript
38+
var Int64Array = require( '@stdlib/array/int64' );
39+
40+
var bool = isInt64Array( new Int64Array( 10 ) );
41+
// returns true
42+
43+
bool = isInt64Array( [] );
44+
// returns false
45+
```
46+
47+
</section>
48+
49+
<!-- /.usage -->
50+
51+
<section class="examples">
52+
53+
## Examples
54+
55+
<!-- eslint no-undef: "error" -->
56+
57+
```javascript
58+
var Int8Array = require( '@stdlib/array/int8' );
59+
var Uint8Array = require( '@stdlib/array/uint8' );
60+
var Uint8ClampedArray = require( '@stdlib/array/uint8c' );
61+
var Int16Array = require( '@stdlib/array/int16' );
62+
var Uint16Array = require( '@stdlib/array/uint16' );
63+
var Int32Array = require( '@stdlib/array/int32' );
64+
var Uint32Array = require( '@stdlib/array/uint32' );
65+
var Float32Array = require( '@stdlib/array/float32' );
66+
var Float64Array = require( '@stdlib/array/float64' );
67+
var Complex64Array = require( '@stdlib/array/complex64' );
68+
var Int64Array = require( '@stdlib/array/int64' );
69+
var isInt64Array = require( '@stdlib/assert/is-int64array' );
70+
71+
var bool = isInt64Array( new Int64Array( 10 ) );
72+
// returns true
73+
74+
bool = isInt64Array( new Complex64Array( 10 ) );
75+
// returns false
76+
77+
bool = isInt64Array( new Float64Array( 10 ) );
78+
// returns false
79+
80+
bool = isInt64Array( new Int8Array( 10 ) );
81+
// returns false
82+
83+
bool = isInt64Array( new Uint8Array( 10 ) );
84+
// returns false
85+
86+
bool = isInt64Array( new Uint8ClampedArray( 10 ) );
87+
// returns false
88+
89+
bool = isInt64Array( new Int16Array( 10 ) );
90+
// returns false
91+
92+
bool = isInt64Array( new Uint16Array( 10 ) );
93+
// returns false
94+
95+
bool = isInt64Array( new Int32Array( 10 ) );
96+
// returns false
97+
98+
bool = isInt64Array( new Uint32Array( 10 ) );
99+
// returns false
100+
101+
bool = isInt64Array( new Float32Array( 10 ) );
102+
// returns false
103+
104+
bool = isInt64Array( [] );
105+
// returns false
106+
107+
bool = isInt64Array( {} );
108+
// returns false
109+
110+
bool = isInt64Array( null );
111+
// returns false
112+
```
113+
114+
</section>
115+
116+
<!-- /.examples -->
117+
118+
<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->
119+
120+
<section class="related">
121+
122+
</section>
123+
124+
<!-- /.related -->
125+
126+
<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
127+
128+
<section class="links">
129+
130+
[@stdlib/array/int64]: https://github.com/stdlib-js/array-int64
131+
132+
</section>
133+
134+
<!-- /.links -->
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
/**
2+
* @license Apache-2.0
3+
*
4+
* Copyright (c) 2026 The Stdlib Authors.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
'use strict';
20+
21+
// MODULES //
22+
23+
var bench = require( '@stdlib/bench' );
24+
var Int8Array = require( '@stdlib/array/int8' );
25+
var Uint8Array = require( '@stdlib/array/uint8' );
26+
var Uint8ClampedArray = require( '@stdlib/array/uint8c' );
27+
var Int16Array = require( '@stdlib/array/int16' );
28+
var Uint16Array = require( '@stdlib/array/uint16' );
29+
var Int32Array = require( '@stdlib/array/int32' );
30+
var Uint32Array = require( '@stdlib/array/uint32' );
31+
var Float32Array = require( '@stdlib/array/float32' );
32+
var Float64Array = require( '@stdlib/array/float64' );
33+
var Int64Array = require( '@stdlib/array/int64' );
34+
var isBoolean = require( './../../is-boolean' ).isPrimitive;
35+
var format = require( '@stdlib/string/format' );
36+
var pkg = require( './../package.json' ).name;
37+
var isInt64Array = require( './../lib' );
38+
39+
40+
// MAIN //
41+
42+
bench( pkg, function benchmark( b ) {
43+
var values;
44+
var bool;
45+
var i;
46+
47+
values = [
48+
new Float64Array( 10 ),
49+
new Float32Array( 10 ),
50+
new Int32Array( 10 ),
51+
new Uint32Array( 10 ),
52+
new Int16Array( 10 ),
53+
new Uint16Array( 10 ),
54+
new Int8Array( 10 ),
55+
new Uint8Array( 10 ),
56+
new Uint8ClampedArray( 10 ),
57+
new Int64Array( 10 )
58+
];
59+
60+
b.tic();
61+
for ( i = 0; i < b.iterations; i++ ) {
62+
bool = isInt64Array( values[ i%values.length ] );
63+
if ( typeof bool !== 'boolean' ) {
64+
b.fail( 'should return a boolean' );
65+
}
66+
}
67+
b.toc();
68+
if ( !isBoolean( bool ) ) {
69+
b.fail( 'should return a boolean' );
70+
}
71+
b.pass( 'benchmark finished' );
72+
b.end();
73+
});
74+
75+
bench( format( '%s::true', pkg ), function benchmark( b ) {
76+
var values;
77+
var bool;
78+
var i;
79+
80+
values = [
81+
new Int64Array( 10 ),
82+
new Int64Array( 10 )
83+
];
84+
85+
b.tic();
86+
for ( i = 0; i < b.iterations; i++ ) {
87+
bool = isInt64Array( values[ i%values.length ] );
88+
if ( typeof bool !== 'boolean' ) {
89+
b.fail( 'should return a boolean' );
90+
}
91+
}
92+
b.toc();
93+
if ( !isBoolean( bool ) ) {
94+
b.fail( 'should return a boolean' );
95+
}
96+
b.pass( 'benchmark finished' );
97+
b.end();
98+
});
99+
100+
bench( format( '%s::false', pkg ), function benchmark( b ) {
101+
var values;
102+
var bool;
103+
var i;
104+
105+
values = [
106+
new Float64Array( 10 ),
107+
new Float32Array( 10 ),
108+
new Int32Array( 10 ),
109+
new Uint32Array( 10 ),
110+
new Int16Array( 10 ),
111+
new Uint16Array( 10 ),
112+
new Int8Array( 10 ),
113+
new Uint8Array( 10 ),
114+
new Uint8ClampedArray( 10 )
115+
];
116+
117+
b.tic();
118+
for ( i = 0; i < b.iterations; i++ ) {
119+
bool = isInt64Array( values[ i%values.length ] );
120+
if ( typeof bool !== 'boolean' ) {
121+
b.fail( 'should return a boolean' );
122+
}
123+
}
124+
b.toc();
125+
if ( !isBoolean( bool ) ) {
126+
b.fail( 'should return a boolean' );
127+
}
128+
b.pass( 'benchmark finished' );
129+
b.end();
130+
});

‎is-int64array/docs/repl.txt‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
2+
{{alias}}( value )
3+
Tests if a value is an Int64Array.
4+
5+
Parameters
6+
----------
7+
value: any
8+
Value to test.
9+
10+
Returns
11+
-------
12+
bool: boolean
13+
Boolean indicating whether value is an Int64Array.
14+
15+
Examples
16+
--------
17+
> var bool = {{alias}}( new {{alias:@stdlib/array/int64}}( 10 ) )
18+
true
19+
> bool = {{alias}}( [] )
20+
false
21+
22+
See Also
23+
--------
24+
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
* @license Apache-2.0
3+
*
4+
* Copyright (c) 2026 The Stdlib Authors.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
// TypeScript Version: 4.1
20+
21+
/// <reference types="@stdlib/types"/>
22+
23+
import { Int64Array } from '@stdlib/types/array';
24+
25+
/**
26+
* Tests if a value is an Int64Array.
27+
*
28+
* @param value - value to test
29+
* @returns boolean indicating whether value is an Int64Array
30+
*
31+
* @example
32+
* var Int64Array = require( '@stdlib/array/int64' );
33+
*
34+
* var bool = isInt64Array( new Int64Array( 10 ) );
35+
* // returns true
36+
*
37+
* @example
38+
* var bool = isInt64Array( [] );
39+
* // returns false
40+
*/
41+
declare function isInt64Array( value: any ): value is Int64Array;
42+
43+
44+
// EXPORTS //
45+
46+
export = isInt64Array;

‎is-int64array/docs/types/test.ts‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
* @license Apache-2.0
3+
*
4+
* Copyright (c) 2026 The Stdlib Authors.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
import isInt64Array = require( './index' );
20+
21+
22+
// TESTS //
23+
24+
// The function returns a boolean...
25+
{
26+
isInt64Array( [] ); // $ExpectType boolean
27+
}
28+
29+
// The compiler throws an error if the function is provided an unsupported number of arguments...
30+
{
31+
isInt64Array(); // $ExpectError
32+
isInt64Array( [], 123 ); // $ExpectError
33+
}

0 commit comments

Comments
 (0)