Skip to content

Commit 930dd3c

Browse files
committed
Add namespace files
1 parent 77e9cb8 commit 930dd3c

File tree

12 files changed

+592
-0
lines changed

12 files changed

+592
-0
lines changed
Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
<!--
2+
3+
@license Apache-2.0
4+
5+
Copyright (c) 2022 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+
# Native Add-ons
22+
23+
> C APIs for creating Node-API native add-ons.
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+
This package exposes an absolute file path for the directory containing header files for various C APIs. The various C APIs facilitate the creation of Node-API native add-ons.
30+
31+
</section>
32+
33+
<!-- /.intro -->
34+
35+
<!-- Package usage documentation. -->
36+
37+
<section class="usage">
38+
39+
## Usage
40+
41+
```javascript
42+
var headerDir = require( '@stdlib/napi' );
43+
```
44+
45+
#### headerDir
46+
47+
Absolute file path for the directory containing header files for C APIs.
48+
49+
```javascript
50+
var dir = headerDir;
51+
// returns <string>
52+
```
53+
54+
</section>
55+
56+
<!-- /.usage -->
57+
58+
<!-- Package usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
59+
60+
<section class="notes">
61+
62+
</section>
63+
64+
<!-- /.notes -->
65+
66+
<!-- Package usage examples. -->
67+
68+
<section class="examples">
69+
70+
## Examples
71+
72+
```javascript
73+
var headerDir = require( '@stdlib/napi' );
74+
75+
console.log( headerDir );
76+
// => <string>
77+
```
78+
79+
</section>
80+
81+
<!-- /.examples -->
82+
83+
<!-- C interface documentation. -->
84+
85+
* * *
86+
87+
<section class="c">
88+
89+
## C APIs
90+
91+
<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
92+
93+
<section class="intro">
94+
95+
This package exposes various C APIs to facilitate the creation of Node-API native add-ons. The included C APIs are the APIs implemented in the following packages:
96+
97+
<!-- NOTE: please keep in alphabetical order -->
98+
99+
For API documentation, consult the individual packages.
100+
101+
</section>
102+
103+
<!-- /.intro -->
104+
105+
<!-- C usage documentation. -->
106+
107+
<section class="usage">
108+
109+
### Usage
110+
111+
```c
112+
#include "stdlib/napi.h"
113+
```
114+
115+
</section>
116+
117+
<!-- /.usage -->
118+
119+
<!-- C API usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
120+
121+
<section class="notes">
122+
123+
</section>
124+
125+
<!-- /.notes -->
126+
127+
<!-- C API usage examples. -->
128+
129+
<section class="examples">
130+
131+
### Examples
132+
133+
```c
134+
#include "stdlib/napi.h"
135+
```
136+
137+
</section>
138+
139+
<!-- /.examples -->
140+
141+
</section>
142+
143+
<!-- /.c -->
144+
145+
<!-- 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. -->
146+
147+
<section class="references">
148+
149+
</section>
150+
151+
<!-- /.references -->
152+
153+
<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->
154+
155+
<section class="related">
156+
157+
</section>
158+
159+
<!-- /.related -->
160+
161+
<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
162+
163+
<section class="links">
164+
165+
</section>
166+
167+
<!-- /.links -->
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) 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+
// TypeScript Version: 2.0
20+
21+
/**
22+
* Absolute file path for the directory containing header files for C APIs.
23+
*
24+
* @example
25+
* var dir = headerDir;
26+
* // returns <string>
27+
*/
28+
declare const headerDir: string;
29+
30+
31+
// EXPORTS //
32+
33+
export = headerDir;
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* @license Apache-2.0
3+
*
4+
* Copyright (c) 2020 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 headerDir = require( './index' );
20+
21+
22+
// TESTS //
23+
24+
// The variable is a string...
25+
{
26+
// tslint:disable-next-line:no-unused-expression
27+
headerDir; // $ExpectType string
28+
}
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>
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
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+
#ifndef STDLIB_NAPI_H
20+
#define STDLIB_NAPI_H
21+
22+
// Note: keep in alphabetical order...
23+
#include "stdlib/napi/argv.h"
24+
#include "stdlib/napi/argv_complex64array.h"
25+
#include "stdlib/napi/argv_complex128array.h"
26+
#include "stdlib/napi/argv_double.h"
27+
#include "stdlib/napi/argv_float.h"
28+
#include "stdlib/napi/argv_float32array.h"
29+
#include "stdlib/napi/argv_float64array.h"
30+
#include "stdlib/napi/argv_int8array.h"
31+
#include "stdlib/napi/argv_int16array.h"
32+
#include "stdlib/napi/argv_int32.h"
33+
#include "stdlib/napi/argv_int32array.h"
34+
#include "stdlib/napi/argv_int64.h"
35+
#include "stdlib/napi/argv_strided_complex64array.h"
36+
#include "stdlib/napi/argv_strided_complex128array.h"
37+
#include "stdlib/napi/argv_strided_float32array.h"
38+
#include "stdlib/napi/argv_strided_float64array.h"
39+
#include "stdlib/napi/argv_strided_int8array.h"
40+
#include "stdlib/napi/argv_strided_int16array.h"
41+
#include "stdlib/napi/argv_strided_int32array.h"
42+
#include "stdlib/napi/argv_strided_uint8array.h"
43+
#include "stdlib/napi/argv_strided_uint16array.h"
44+
#include "stdlib/napi/argv_strided_uint32array.h"
45+
#include "stdlib/napi/argv_uint8array.h"
46+
#include "stdlib/napi/argv_uint16array.h"
47+
#include "stdlib/napi/argv_uint32.h"
48+
#include "stdlib/napi/argv_uint32array.h"
49+
50+
#endif // !STDLIB_NAPI_H
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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+
// MAIN //
22+
23+
var headerDir = null;
24+
25+
26+
// EXPORTS //
27+
28+
module.exports = headerDir;
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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+
/**
22+
* Absolute file path for the directory containing header files for C APIs.
23+
*
24+
* @module @stdlib/napi
25+
*
26+
* @example
27+
* var headerDir = require( '@stdlib/napi' );
28+
*
29+
* console.log( headerDir );
30+
*/
31+
32+
// MODULES //
33+
34+
var main = require( './main.js' );
35+
36+
37+
// EXPORTS //
38+
39+
module.exports = main;

0 commit comments

Comments
 (0)