https://github.com/s-a/nmp
Support different runtime versions of native modules
https://github.com/s-a/nmp
Last synced: 3 months ago
JSON representation
Support different runtime versions of native modules
- Host: GitHub
- URL: https://github.com/s-a/nmp
- Owner: s-a
- License: other
- Created: 2015-07-30T11:44:15.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-07-30T19:52:44.000Z (almost 10 years ago)
- Last Synced: 2025-03-29T19:34:30.705Z (4 months ago)
- Language: JavaScript
- Homepage:
- Size: 129 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Native Module Path (nmp)
[](http://badge.fury.io/js/nmp)
[](https://travis-ci.org/s-a/nmp)
[](https://david-dm.org/s-a/nmp)
[](https://david-dm.org/s-a/nmp#info=devDependencies)Give love to the path of native Node.js modules and support different runtime versions.
## API
### NMP.join
Acts like path.join but injects a version string of current running v8 engine to second last position.
```javascript
var NMP = require("nmp");
var nmp = new NMP();var dir = nmp.join(__dirname, "bin", "my-native-module-name.node");
console.log(dir)// --> c:\git\nmp\test\bin\win32-ia32-v8-3.28\my-native-module-name.node