A set of utilities to assist developers of tools that build N-API native add-ons.
The main repository can be found here.
boolean
boolean
number
| undefined
Array.<string>
string
| undefined
boolean
Implements a consistent name of napi
for N-API runtimes.
Kind: static method of napi-build-utils
Param | Type | Description |
---|---|---|
runtime | string |
The runtime string. |
boolean
Determines whether the specified N-API version is supported by both the currently running Node instance and the package.
Kind: static method of napi-build-utils
Param | Type | Description |
---|---|---|
napiVersion | string |
The N-API version to check. |
Issues a warning to the supplied log if the N-API version is not supported by the current Node instance or if the N-API version is not supported by the package.
Kind: static method of napi-build-utils
Param | Type | Description |
---|---|---|
napiVersion | string |
The N-API version to check. |
log | Object |
The log object to which the warnings are to be issued. Must implement the warn method. |
number
| undefined
Returns the best N-API version to build given the highest N-API version supported by the current Node instance and the N-API versions supported by the package, or undefined if a suitable N-API version cannot be determined.
The best build version is the greatest N-API version supported by the package that is less than or equal to the highest N-API version supported by the current Node instance.
Kind: static method of napi-build-utils
Array.<string>
Returns an array of N-API versions supported by the package.
Kind: static method of napi-build-utils
string
| undefined
Returns the highest N-API version supported by the current node instance or undefined if N-API is not supported.
Kind: static method of napi-build-utils