0.1.1 • Published 6 years ago

nano-exists v0.1.1

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

nano-exists

npm version Dependencies Status devDependencies Status build status

An async/await wrapper to check if something in the filesystem exists.

Getting Started

This is how we roll:

Installing

$ npm i nano-exists

Usage

const exists = require('nano-exists')('fs');

(async () => {
  try{
    await console.log(await exists.check(process.argv[2]));
  } catch (err) {
    return console.log(err);
  }
})();

Instead of fs you could use any other filesystem module which has the method fs.accesSync(), such as fs-extra. Just replace

const exists = require('nano-exists')('fs');

with

const exists = require('nano-exists')('fs-extra');

API

check(path)

Returns a boolean in an async matter wether path exists or not.

If path exists returns true else returns false.

Tests

$ npm run test

Built With

0.1.1

6 years ago

0.1.0

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago