dirdir
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

dirdir npm

Make a directory.

  • always recursive
  • return full path instead of "first directory path created"
  • return null instead of undefined when directory already exists

Install

$ yarn add dirdir

Usage

const makeDir: (dirPath: string) => Promise<string | null>
import { makeDir } from 'dirdir'
 
console.log(prcess.cwd())
// /foo
 
console.log(
  await makeDir('bar/baz')
)
// '/foo/bar/baz'
 
console.log(
  await makeDir('/foo')
)
// null

Readme

Keywords

none

Package Sidebar

Install

npm i dirdir

Weekly Downloads

77,865

Version

0.1.0

License

MIT

Unpacked Size

2.58 kB

Total Files

5

Last publish

Collaborators

  • fosimus
  • psxcode
  • deepsweet