0.1.1 • Published 7 years ago

nano-exists v0.1.1

Weekly downloads
2
License
MIT
Repository
github
Last release
7 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

7 years ago

0.1.0

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.2

7 years ago

0.0.1

8 years ago