@node-rs/helper
v1.6.0
Published
Helper library for node-rs
Downloads
430,193
Readme
@node-rs/helper
Helper library for load native package.
Usage
locateBinding
Load native binding file from dirname
loadBinding(dirname: string, filename?: string = 'index', packageName?: string): string
dirname
, dirname which the .node binding file locatedfilename
, thenapi.name
filed in youpackage.json
packageName
, thename
filed in yourpackage.json
,@swc/core
for example.return native module
const { loadBinding } = require('@node-rs/helper')
module.exports = loadBinding(__dirname, 'swc', '@swc/core')