@justinc/dir-exists

Checks if a directory exists or not

Stats

StarsIssuesVersionUpdatedCreatedSize
@justinc/dir-exists
002.1.05 years ago5 years agoMinified + gzip package size for @justinc/dir-exists in KB

Readme

NPM

var dirExists = require('@justinc/dir-exists').dirExists;
var dirExistsSync = require('@justinc/dir-exists').dirExistsSync;
var dirExistsAsPromised = require('@justinc/dir-exists').dirExistsAsPromised;

console.log('sync:', dirExistsSync('/some/path/to/dir'));
console.log(dirExists('/some/path/to/dir', (err, exists) => {
  if (err) throw err;
  console.log('async:', exists);
}));
dirExistsAsPromised('/some/path/to/dir').then(exists => console.log('promise:', exists));

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.