Skip to content

Make directories recursively -plz 🙏

Notifications You must be signed in to change notification settings

terkelg/mkdirplz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mkdirplz

mkdir -plz

Make directories recursively -please - you promised!

Installation

npm install mkdirplz

OBS: This package uses async/await and requires Node.js 7.6

Usage

const mkdir = require('mkdirplz');

await mkdir('path/to/something');
// => path/to/something

await mkdir('path/to/myfile.js', { filepath: true });
// => path/to/

API

This package does not create the last part of the path, since it assumes that's a filepath.

mkdirplz(path, options)

Type: Promise

Creates path recursively.

path

Type: String

A string file path to create.

options.filepath

Type: Boolean
Default: false

Set to true to skip making the last segment. Useful if the input path is a filename.

Related

License

MIT © Terkel Gjervig

About

Make directories recursively -plz 🙏

Topics

Resources

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published