Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/s-a/nmp
Support different runtime versions of native modules
https://github.com/s-a/nmp
Last synced: about 5 hours 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 (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-07-30T19:52:44.000Z (over 9 years ago)
- Last Synced: 2024-10-11T07:45:18.554Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 129 KB
- Stars: 3
- Watchers: 3
- 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)
[![npm version](https://badge.fury.io/js/nmp.svg)](http://badge.fury.io/js/nmp)
[![Build Status](https://travis-ci.org/s-a/nmp.svg)](https://travis-ci.org/s-a/nmp)
[![Dependency Status](https://david-dm.org/s-a/nmp.svg)](https://david-dm.org/s-a/nmp)
[![devDependency Status](https://david-dm.org/s-a/nmp/dev-status.svg)](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