Socket
Book a DemoInstallSign in
Socket

is-directory-empty

Package Overview
Dependencies
Maintainers
0
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-directory-empty

Check if a directory is empty

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
0
Created
Source

is-directory-empty

Check if a directory is empty

It uses the fastest way to check.

Install

npm install is-directory-empty

Usage

import {isDirectoryEmpty} from 'is-directory-empty';

console.log(await isDirectoryEmpty('./some-directory'));
//=> true

API

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.

Keywords

directory

FAQs

Package last updated on 25 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts