@warren-bank/mkdir-sync
v1.0.2
Published
Polyfill library for 'fs.mkdirSync()' to support the 'recursive' option in versions of Node.js older than v10.12.0
Readme
mkdirSync
Polyfill library for fs.mkdirSync() to support the recursive option in versions of Node.js older than v10.12.0
Usage:
add library to project as a dependency:
npm install --save "@warren-bank/mkdir-sync"use library in project:
const mkdirSync = require('@warren-bank/mkdir-sync')
const path = require('path')
const dirpath = path.join(__dirname, 'a', 'b', 'c')
try {
mkdirSync(dirpath, {recursive: true})
}
catch(error) {
console.log(error)
}Legal:
- copyright: Warren Bank
- license: GPL-2.0
Similar npm Libraries:
mkdir-recursive- npm repo
- github repo
- code is well written
