@lxf2513/mkdir-recursive
v1.2.0
Published
Recursively creates a directory. Returns undefined or the first directory path created.
Downloads
179
Maintainers
Readme
mkdir-recursive
Recursively creates a directory. Returns undefined or the first directory path created.
Installation
npm @lxf2513/mkdir-recursive
Usage
// sync
import { mkdirSyncRecursive } from '@lxf2513/mkdir-recursive'
const path = mkdirSyncRecursive('/path/source')
const paths = mkdirSyncRecursive(['test', 'build/scripts', 'test/html'])
// async
import { mkdirAsyncRecursive } from '@lxf2513/mkdir-recursive'
const path = await mkdirAsyncRecursive('/path/source')