Skip to content

Commit e08ef82

Browse files
authored
docs: remove stray err handling in examples and enable lint rule
PR-URL: #11556 Reviewed-by: Athan Reines <kgryte@gmail.com>
1 parent b946af9 commit e08ef82

File tree

5 files changed

+4
-16
lines changed

5 files changed

+4
-16
lines changed

lib/node_modules/@stdlib/napi/create-int64/README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,6 @@ static napi_value addon( napi_env env, napi_callback_info info ) {
119119
napi_value value;
120120
napi_status status = stdlib_napi_create_int64( env, 1, &value );
121121
assert( status == napi_ok );
122-
if ( err != NULL ) {
123-
assert( napi_throw( env, err ) == napi_ok );
124-
return NULL;
125-
}
126122

127123
// ...
128124
}

lib/node_modules/@stdlib/napi/create-int64/src/main.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@
4040
* napi_value value;
4141
* napi_status status = stdlib_napi_create_int64( env, 1, &value );
4242
* assert( status == napi_ok );
43-
* if ( err != NULL ) {
44-
* assert( napi_throw( env, err ) == napi_ok );
45-
* return NULL;
46-
* }
4743
*
4844
* // ...
4945
* }

lib/node_modules/@stdlib/napi/create-uint64/README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,6 @@ static napi_value addon( napi_env env, napi_callback_info info ) {
119119
napi_value value;
120120
napi_status status = stdlib_napi_create_uint64( env, 1, &value );
121121
assert( status == napi_ok );
122-
if ( err != NULL ) {
123-
assert( napi_throw( env, err ) == napi_ok );
124-
return NULL;
125-
}
126122

127123
// ...
128124
}
@@ -187,6 +183,8 @@ The macro expects the following arguments:
187183
188184
<section class="notes">
189185
186+
- The generated JavaScript value is a `BigInt` (N-API Version 6+).
187+
190188
</section>
191189
192190
<!-- /.notes -->

lib/node_modules/@stdlib/napi/create-uint64/src/main.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@
4040
* napi_value value;
4141
* napi_status status = stdlib_napi_create_uint64( env, 1, &value );
4242
* assert( status == napi_ok );
43-
* if ( err != NULL ) {
44-
* assert( napi_throw( env, err ) == napi_ok );
45-
* return NULL;
46-
* }
4743
*
4844
* // ...
4945
* }

lib/node_modules/@stdlib/ndarray/colcat/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ The function accepts the following arguments:
111111

112112
## Examples
113113

114+
<!-- eslint no-undef: "error" -->
115+
114116
```javascript
115117
var discreteUniform = require( '@stdlib/random/discrete-uniform' );
116118
var ndarray2array = require( '@stdlib/ndarray/to-array' );

0 commit comments

Comments
 (0)