@brpereyra/directory-exists

Validate if a directory exists

Usage no npm install needed!

<script type="module">
  import brpereyraDirectoryExists from 'https://cdn.skypack.dev/@brpereyra/directory-exists';
</script>

README

NPM Version NPM Downloads

Directory Exist

Allows to verify the existence of any directory on the computer.

Install

$ npm install @brpereyra/directory-exists

Examples

const de = require("@brpereyra/directory-exists");
const exists = de.directoryExists("path/to/directory");

console.log(exists); // return true if the directory exists

Or

const { directoryExists } = require("@brpereyra/directory-exists");
const exists = directoryExists("path/to/directory");

console.log(exists); // return true if the directory exists

License

MIT