nad-bindings
Generic Node.js bindings, uses @TooTallNate's bindings for `.node` modules and `process.binding` when run as part of Node.js
Last updated 6 years ago by thlorenz .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install nad-bindings 
SYNC missed versions from official npm registry.

nad-bindings

Generic Node.js bindings, uses @TooTallNate's bindings for .node modules and process.binding when run as part of Node.js.

Use it for projects generated with nad.

var leveldown = require('nad-bindings')('leveldown.node').leveldown

Installation

npm install nad-bindings

API

resolveBinding(name) → {Object}

Convenience function to consistently resolve a module binding for two cases:

  • a) module is run as addon and the bindings module is used to resolve the module
  • b) module is currently being debugged and directly executed inside a node process and therefore is resolved via process.binding
Parameters:
Name Type Description
name string

full name of the module

Source:
Returns:

the binding object of the native module

Type
Object

generated with docme

Implementation

Looks for DYLD_LIBRARY_PATH environment variable to determine whether it is run via Xcode. Any improvements on that are welcome.

License

MIT

Current Tags

  • 0.3.0                                ...           latest (6 years ago)

4 Versions

  • 0.3.0                                ...           6 years ago
  • 0.2.0                                ...           6 years ago
  • 0.1.1                                ...           6 years ago
  • 0.1.0                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (1)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |