npm.io
1.0.2 • Published 3 years ago

@warren-bank/mkdir-sync

Licence
GPL-2.0
Version
1.0.2
Deps
0
Size
20 kB
Vulns
0
Weekly
0

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)
  }

Similar npm Libraries: