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 = '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
Returns:
the binding object of the native module
- Type
- Object
- a) module is run as addon and the
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