0.0.2 • Published 6 years ago

simple-npm-api v0.0.2

Weekly downloads
6
License
GPL-3.0+
Repository
github
Last release
6 years ago

NPM API

Build Status devDependencies Status NpmVersion GitHub

Simple Npm Api for nodejs

  npm install simple-npm-api

Example:

import NpmNodeApi from 'simple-npm-api'

let sna = new NpmNodeApi;

sna.install({
  name: 'package name',
  version: 'version package name',
  global: true
}).then((errors)=>{
  if(errors){
    // The command has runned but something happen
    console.log(errors);
  }
}).catch((valueTypesErrors)=>{
  // The parameters you have passed to the install class
  // are not correct, for example if global is not a boolean;
  console.log(valueTypesErrors);
});