Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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