@node-rs/helper
    TypeScript icon, indicating that this package has built-in type declarations

    1.3.2 • Public • Published

    @node-rs/helper

    install size Downloads

    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 located

    • filename, the napi.name filed in you package.json

    • packageName, the name filed in your package.json, @swc/core for example.

    • return native module

    const { loadBinding } = require('@node-rs/helper')
    
    module.exports = loadBinding(__dirname, 'swc', '@swc/core')

    Install

    npm i @node-rs/helper

    DownloadsWeekly Downloads

    752,242

    Version

    1.3.2

    License

    MIT

    Unpacked Size

    5.53 kB

    Total Files

    7

    Last publish

    Collaborators

    • dxd_sjtu
    • broooooklyn