Skip to content

Commit c5bde22

Browse files
committed
Auto-generated commit
1 parent fd7ef62 commit c5bde22

File tree

23 files changed

+1189
-1
lines changed

23 files changed

+1189
-1
lines changed

CHANGELOG.md

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

7-
## Unreleased (2025-06-05)
7+
## Unreleased (2025-06-17)
88

99
<section class="features">
1010

1111
### Features
1212

13+
- [`f58120f`](https://github.com/stdlib-js/stdlib/commit/f58120f6a16840c817e26f439224a67e1680e21c) - add header for asserting is a Node-API value is a DataView
14+
- [`393b4e1`](https://github.com/stdlib-js/stdlib/commit/393b4e118d8152c99490be25c1953f48afc64087) - add `assert/napi/is-dataview`
1315
- [`25231ce`](https://github.com/stdlib-js/stdlib/commit/25231ce28c32227f3514a468dd6b9b2ca494e53b) - add `isEqualUint8ClampedArray` to namespace
1416
- [`b5c4b2c`](https://github.com/stdlib-js/stdlib/commit/b5c4b2caf155d22f1e18c3843294b8af70a30ce7) - add `assert/is-equal-uint8clampedarray`
1517
- [`e166067`](https://github.com/stdlib-js/stdlib/commit/e16606740154f7fd9dc727918b3b1c91a4dabd1c) - add `isEqualUint8Array` to namespace
@@ -103,6 +105,8 @@ A total of 6 issues were closed in this release:
103105

104106
<details>
105107

108+
- [`f58120f`](https://github.com/stdlib-js/stdlib/commit/f58120f6a16840c817e26f439224a67e1680e21c) - **feat:** add header for asserting is a Node-API value is a DataView _(by Athan Reines)_
109+
- [`393b4e1`](https://github.com/stdlib-js/stdlib/commit/393b4e118d8152c99490be25c1953f48afc64087) - **feat:** add `assert/napi/is-dataview` _(by Athan Reines)_
106110
- [`d40eeed`](https://github.com/stdlib-js/stdlib/commit/d40eeedd3e34280593e10be51238e0d80cf2a7cf) - **chore:** fix EditorConfig lint errors [(#7205)](https://github.com/stdlib-js/stdlib/pull/7205) _(by Deepak Singh)_
107111
- [`21cdf0c`](https://github.com/stdlib-js/stdlib/commit/21cdf0c4d3de902744dfecd3387bc64317eddfd4) - **fix:** javascript lint errors [(#7143)](https://github.com/stdlib-js/stdlib/pull/7143) _(by Tushar Bhardwaj, Athan Reines)_
108112
- [`26f5797`](https://github.com/stdlib-js/stdlib/commit/26f5797c30ac9fbdb8a5d11e3dc58ae71813ab0f) - **chore:** fix EditorConfig lint errors [(#7099)](https://github.com/stdlib-js/stdlib/pull/7099) _(by Lalit Narayan Yadav)_

CONTRIBUTORS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,13 @@ Ali Salesi <ali_sal1381@yahoo.com>
2121
AlyAbdelmoneim <148393799+AlyAbdelmoneim@users.noreply.github.com>
2222
Aman Bhansali <bhansali.1@iitj.ac.in>
2323
AmanBhadkariya <140033975+AmanBhadkariya@users.noreply.github.com>
24+
Amisha Chhajed <136238836+amishhaa@users.noreply.github.com>
2425
Amit Jimiwal <amitjimiwal45@gmail.com>
26+
Annamalai Prabu <apfossdev@gmail.com>
2527
Anshu Kumar <132515490+anxhukumar@users.noreply.github.com>
2628
Anshu Kumar <contact.anshukumar@protonmail.com>
2729
Anudeep Sanapala <anudeep0306@gmail.com>
30+
Aryan Bhirud <112156883+AryanBhirud@users.noreply.github.com>
2831
Athan Reines <kgryte@gmail.com>
2932
Ayaka <73595362+USERSATOSHI@users.noreply.github.com>
3033
Bhavishy Agrawal <90029607+bhavishy2801@users.noreply.github.com>
@@ -38,6 +41,7 @@ Daniel Killenberger <daniel.killenberger@gmail.com>
3841
Daniel Yu <40680511+Daniel777y@users.noreply.github.com>
3942
Debashis Maharana <debashismaharana7854@gmail.com>
4043
Deep Trivedi <128926685+thedeeppp@users.noreply.github.com>
44+
Deepak Singh <78257493+Deepak91168@users.noreply.github.com>
4145
Desh Deepak Kant <118960904+DeshDeepakKant@users.noreply.github.com>
4246
Dev Goel <135586571+corsairier@users.noreply.github.com>
4347
Dhanyabad behera <110620935+dhanyabad11@users.noreply.github.com>
@@ -91,6 +95,7 @@ Krishnam Agarwal <83017176+888krishnam@users.noreply.github.com>
9195
Krishnendu Das <86651039+itskdhere@users.noreply.github.com>
9296
Kshitij-Dale <152467202+Kshitij-Dale@users.noreply.github.com>
9397
Lalit Narayan Yadav <162928571+LalitNarayanYadav@users.noreply.github.com>
98+
Lokesh Ranjan <lokesh.ranjan.phe23@itbhu.ac.in>
9499
Lovelin Dhoni J B <100030865+lovelindhoni@users.noreply.github.com>
95100
MANI <77221000+Eternity0207@users.noreply.github.com>
96101
Mahfuza Humayra Mohona <mhmohona@gmail.com>
@@ -119,6 +124,7 @@ Ognjen Jevremović <ognjenjevremovic@users.noreply.github.com>
119124
Oneday12323 <107678750+Oneday12323@users.noreply.github.com>
120125
Ori Miles <97595296+orimiles5@users.noreply.github.com>
121126
Philipp Burckhardt <pburckhardt@outlook.com>
127+
Pierre Forstmann <15964998+pierreforstmann@users.noreply.github.com>
122128
Prajjwal Bajpai <142303989+prajjwalbajpai@users.noreply.github.com>
123129
Prajwal Kulkarni <prajwalkulkarni76@gmail.com>
124130
Pranav Goswami <pranavchiku11@gmail.com>

napi/include/stdlib/assert/napi.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include "stdlib/assert/napi/equal_typedarray_types.h"
2424
#include "stdlib/assert/napi/equal_types.h"
2525
#include "stdlib/assert/napi/has_property.h"
26+
#include "stdlib/assert/napi/is_dataview.h"
2627
#include "stdlib/assert/napi/is_type.h"
2728
#include "stdlib/assert/napi/is_typedarray.h"
2829
#include "stdlib/assert/napi/status_ok.h"

napi/is-dataview/README.md

Lines changed: 195 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
<!--
2+
3+
@license Apache-2.0
4+
5+
Copyright (c) 2025 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+
# Assert DataView
22+
23+
> Assert that a Node-API value is a DataView.
24+
25+
<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
26+
27+
<section class="intro">
28+
29+
</section>
30+
31+
<!-- /.intro -->
32+
33+
<!-- Package usage documentation. -->
34+
35+
<section class="usage">
36+
37+
## Usage
38+
39+
```javascript
40+
var headerDir = require( '@stdlib/assert/napi/is-dataview' );
41+
```
42+
43+
#### headerDir
44+
45+
Absolute file path for the directory containing header files for C APIs.
46+
47+
```javascript
48+
var dir = headerDir;
49+
// returns <string>
50+
```
51+
52+
</section>
53+
54+
<!-- /.usage -->
55+
56+
<!-- Package usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
57+
58+
<section class="notes">
59+
60+
</section>
61+
62+
<!-- /.notes -->
63+
64+
<!-- Package usage examples. -->
65+
66+
<section class="examples">
67+
68+
## Examples
69+
70+
```javascript
71+
var headerDir = require( '@stdlib/assert/napi/is-dataview' );
72+
73+
console.log( headerDir );
74+
// => <string>
75+
```
76+
77+
</section>
78+
79+
<!-- /.examples -->
80+
81+
<!-- C interface documentation. -->
82+
83+
* * *
84+
85+
<section class="c">
86+
87+
## C APIs
88+
89+
<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
90+
91+
<section class="intro">
92+
93+
</section>
94+
95+
<!-- /.intro -->
96+
97+
<!-- C usage documentation. -->
98+
99+
<section class="usage">
100+
101+
### Usage
102+
103+
```c
104+
#include "stdlib/assert/napi/is_dataview.h"
105+
```
106+
107+
#### stdlib_assert_napi_value_is_dataview( env, value, \*message, \*err )
108+
109+
Asserts that a Node-API value is a DataView.
110+
111+
```c
112+
#include "stdlib/assert/napi/is_dataview.h"
113+
#include <node_api.h>
114+
115+
static napi_value addon( napi_env env, napi_callback_info info ) {
116+
napi_value value;
117+
118+
// ...
119+
120+
napi_value err;
121+
napi_status status = stdlib_assert_napi_value_is_dataview( env, value, "Must be a DataView.", &err );
122+
assert( status == napi_ok );
123+
if ( err != NULL ) {
124+
assert( napi_throw( env, err ) == napi_ok );
125+
return NULL;
126+
}
127+
128+
// ...
129+
}
130+
```
131+
132+
The function accepts the following arguments:
133+
134+
- **env**: `[in] napi_env` environment under which the function is invoked.
135+
- **value**: `[in] napi_value` Node-API value.
136+
- **message**: `[in] char*` error message.
137+
- **err**: `[out] napi_value*` pointer for storing a JavaScript error.
138+
139+
```c
140+
napi_status stdlib_assert_napi_value_is_dataview( const napi_env env, const napi_value value, const char *message, napi_value *err );
141+
```
142+
143+
The function returns a `napi_status` status code indicating success or failure (returns `napi_ok` if success).
144+
145+
</section>
146+
147+
<!-- /.usage -->
148+
149+
<!-- C API usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
150+
151+
<section class="notes">
152+
153+
### Notes
154+
155+
- If not provided a DataView, the function sets `err` with a JavaScript error; otherwise, `err` is set to `NULL`.
156+
157+
</section>
158+
159+
<!-- /.notes -->
160+
161+
<!-- C API usage examples. -->
162+
163+
<section class="examples">
164+
165+
</section>
166+
167+
<!-- /.examples -->
168+
169+
</section>
170+
171+
<!-- /.c -->
172+
173+
<!-- Section to include cited references. If references are included, add a horizontal rule *before* the section. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
174+
175+
<section class="references">
176+
177+
</section>
178+
179+
<!-- /.references -->
180+
181+
<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->
182+
183+
<section class="related">
184+
185+
</section>
186+
187+
<!-- /.related -->
188+
189+
<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
190+
191+
<section class="links">
192+
193+
</section>
194+
195+
<!-- /.links -->

0 commit comments

Comments
 (0)