Licence
MIT
Version
1.2.0
Deps
0
Size
9 kB
Vulns
0
Weekly
0
@fujia/check-path
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.