/

Make a directory if none exists

https://github.com/isaacs/node-mkdirp
node
js
var mkdirp = require('mkdirp')
mkdirp('/tmp/some/path/foo', (err) => {
// path exists unless there was an error
})
Edit this page
Want to make your own site like this?
Try gatsby-theme-code-notes by Zander Martineau.
Notes on code. My second brain, by Zander Martineau.