npm-check-install

0.0.4 • Public • Published

npm-check-install

Check if the specific npm package has already been installed or not. If it has been installed, do nothing; Otherwise, install it.

Installation

$ npm install --save npm-check-install

Usage

const npmCheckInstall = require('npm-check-install');
 
npmCheckInstall('antd', { cwd: 'path to check and install' // default process.cwd() })
  .then((hasFound) => {
    // do stuff
  })
  .catch((err) => {
    console.error('ERROR: ', err);
  });

License

MIT © Canner

Readme

Keywords

none

Package Sidebar

Install

npm i npm-check-install

Weekly Downloads

2

Version

0.0.4

License

none

Unpacked Size

5.25 kB

Total Files

5

Last publish

Collaborators

  • abz53378