@fujia/check-path
v1.2.0
Published
Check if a path exists.
Downloads
2
Maintainers
Readme
Check if a path exists.
English | 简体中文
Installation
npm i @fujia/check-path
# or use yarn
yarn add @fujia/check-path
Usage
import { pathExist, pathExistSync } from '@fujia/check-path'
console.log(await pathExist('example.js')); // Returns true if exist, otherwise return false
console.log(pathExistSync('example.js')); // Returns true if exist, otherwise return false
API
pathExists(path)
Returns a Promise.
pathExistsSync(path)
Returns a boolean.