ecman / existsofpath

Get the existing part of a given path, asynchronously

Home Page:https://www.npmjs.com/package/existsofpath

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

existsofpath

build status codecov Code Climate Build status

Get the existing part of a given path, asynchronously.

Usage

'use strict';
const existsOfPath = require('existsofpath');

// If an empty "test" folder exists 
// in the current working directory
let pathToCheck = 'test/some/where/not/there';

existsOfPath(pathToCheck)
  .then((existingPath) => 
    console.log(
      `Path "${existingPath}" exists of given path "${pathToCheck}"`));

Output

Path "test" exists of given path "test/some/where/not/there"

About

Get the existing part of a given path, asynchronously

https://www.npmjs.com/package/existsofpath


Languages

Language:JavaScript 100.0%