1.0.2 • Published 12 months ago

@warren-bank/mkdir-sync v1.0.2

Weekly downloads
-
License
GPL-2.0
Repository
github
Last release
12 months ago

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:


Similar npm Libraries: