@cjser/is-directory-empty
v1.0.0-cjser.2
Published
Check if a directory is empty
Maintainers
Readme
is-directory-empty
Check if a directory is empty
It uses the fastest way to check.
Install
npm install is-directory-emptyUsage
import {isDirectoryEmpty} from 'is-directory-empty';
console.log(await isDirectoryEmpty('./some-directory'));
//=> trueAPI
isDirectoryEmpty(path: string): Promise<boolean>
isDirectoryEmptySync(path: string): boolean
Returns a boolean indicating whether the directory at the given path is empty.
Throws if the path is not a directory or does not exist.
cjser
This package is a CommonJS-compatible build generated by cjser for projects that still need require() support. The source version matches the original npm package version, with a cjser prerelease suffix for this generated build.
Original repository: https://github.com/sindresorhus/is-directory-empty
