2.0.1 • Published 9 years ago

it-exists v2.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
9 years ago

it-exists

Check if a file/folder/module exists with node.js

Installation

$ npm install --save it-exists

Usage

var itExists = require('it-exists');

var myModule = itExists('module-name');
if (myModule)
  myModule('do magic!');

var myModule = itExists('module-name', true);
myModule('do magic!');

if (!itExists.pathSync('./tmp'))
  require('fs').mkdirSync('./tmp');

itExists.pathAsync('./tmp').then(itExists => {
  // handle promise...
});

Changelog

View on github.

2.0.1

9 years ago

2.0.0

9 years ago

1.0.0

9 years ago

0.2.0

10 years ago