UNPKG

445 BMarkdownView Raw
1# `@node-rs/helper`
2
3> Helper library for node-rs
4
5## Usage
6
7### locateBinding
8
9Load native binding file from `dirname`
10
11```ts
12locateBinding(dirname: string): string
13```
14
15- `dirname`, dirname which the **.node** binding file located
16- return the full path of the binding file, throw if file not existed or platform not supported
17
18```ts
19const { locateBinding } = require('@node-rs/helper')
20
21module.exports = require(locateBinding(__dirname))
22```