|
| 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 | +# Assertions for Native Add-ons |
| 22 | + |
| 23 | +> C utilities for Node-API call assertions. |
| 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 assertion APIs. |
| 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/assert/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/assert/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 utilities for Node-API call assertions. 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/assert/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/assert/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 --> |
0 commit comments