cleaner-node
Advanced tools
Comparing version 0.6.12 to 0.6.13
{ | ||
"name": "cleaner-node", | ||
"version": "0.6.12", | ||
"version": "0.6.13", | ||
"description": "Helpful utilities and scripts to make Node projects more legible and easier for the next developer to take over.", | ||
@@ -54,5 +54,5 @@ "main": "index.js", | ||
"eslint-plugin-promise": "^4.2.1", | ||
"eslint-plugin-react": "^7.15.0", | ||
"eslint-plugin-react": "^7.16.0", | ||
"eslint-plugin-standard": "^4.0.1" | ||
} | ||
} |
@@ -22,1 +22,2 @@ # cleaner-node | ||
| 0.6.12 | 2019/10/01 | Add `.isEmpty` to `objects` to differentiate between empty and invalid. | | ||
| 0.6.13 | 2019/10/08 | Add `.createPath` to `files` to create folder path with clean boolean feedback. | |
@@ -48,2 +48,17 @@ const fs = require('fs'); | ||
// ----- FOLDERS | ||
const createPath = value => { | ||
if (!isValidString(value)) { return false; } | ||
if (isFolder(value)) { return true; } | ||
try { | ||
fs.mkdirSync(value, { | ||
recursive: true | ||
}) | ||
} catch (ex) { | ||
console.error(ex); | ||
} | ||
return isFolder(value); | ||
} | ||
// ----- CONTENTS | ||
@@ -205,3 +220,4 @@ | ||
isFolder, | ||
createPath, | ||
fileContents, | ||
@@ -208,0 +224,0 @@ folderContents, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
61752
1576