1.2.0 • Published 2 years ago

@fujia/check-path v1.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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.