npm

Check out our latest tech talk, "JavaScript Supply Chain Security" presented by VP of Security, Adam Baldwin.Watch it here »

n-api

1.2.43 • Public • Published

n-api

NPM version Build status Dependency Status

node.js api for n (https://www.npmjs.org/package/n). Minor version is in step with n.

Usage

n(<version>)

Switch to the specified node version. Download and Install if not present on system.

var n = require('n-api');
 
n('latest');
// do some stuff

n.prev()

Switch to previously active version

n.ls()

List availble versions;

var list = n.ls(); // [ '0.8.6', '0.8.7', ... '0.11.13' ]

n.use(<version>, <cmd>)

Run cmd with the specified version of node.

n.use('0.11.13', 'app.js');

n.bin(<version>)

Return the location of the node binary for the specified version, or null if that version is not installed.o

License

MIT License

Author

Travis Webb (me@traviswebb.com)

install

npm i n-api

Downloadsweekly downloads

4

version

1.2.43

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability