hammer logo

@fujia/check-path

检查一个路径是否存在。
[English](./README.md) | 简体中文
## Installation ```bash npm i @fujia/check-path # or use yarn yarn add @fujia/check-path ``` ## Usage ```javascript import { pathExist, pathExistSync } from '@fujia/check-path' console.log(await pathExist('example.js')); // 如果存在,返回Promise, 否则返回Promise console.log(pathExistSync('example.js')); // 如果存在,返回true, 否则返回false ``` ## API ### pathExists(path) 返回一个 Promise 类型的值. ### pathExistsSync(path) 返回一个 boolean 类型值.