Skip to content

Commit 3459100

Browse files
committed
Update README and add JS example file
1 parent 7215123 commit 3459100

File tree

2 files changed

+94
-2
lines changed

2 files changed

+94
-2
lines changed

lib/node_modules/@stdlib/napi/export/README.md

Lines changed: 70 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,70 @@ limitations under the License.
3636

3737
## Usage
3838

39+
```javascript
40+
var headerDir = require( '@stdlib/assert/napi/equal-types' );
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/equal-types' );
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+
39103
```c
40104
#include "stdlib/napi/export.h"
41105
```
@@ -69,22 +133,26 @@ When used, this macro should be used **instead of** `NAPI_MODULE`. The macro inc
69133
70134
<!-- /.usage -->
71135
72-
<!-- Package usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
136+
<!-- C API usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
73137
74138
<section class="notes">
75139
76140
</section>
77141
78142
<!-- /.notes -->
79143
80-
<!-- Package usage examples. -->
144+
<!-- C API usage examples. -->
81145
82146
<section class="examples">
83147
84148
</section>
85149
86150
<!-- /.examples -->
87151
152+
</section>
153+
154+
<!-- /.c -->
155+
88156
<!-- 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. -->
89157
90158
<section class="references">
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/**
2+
* @license Apache-2.0
3+
*
4+
* Copyright (c) 2022 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+
var headerDir = require( './../lib' );
22+
23+
console.log( headerDir );
24+
// => <string>

0 commit comments

Comments
 (0)