cleaner-node
Advanced tools
Comparing version 0.9.0 to 0.9.1
{ | ||
"name": "cleaner-node", | ||
"version": "0.9.0", | ||
"version": "0.9.1", | ||
"description": "Helpful utilities and scripts to make Node projects more legible and easier for the next developer to take over.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -84,6 +84,7 @@ const fs = require('fs'); | ||
}; | ||
const writeFile = (filePath, contents = '', createPath = true, overwrite = false) => { | ||
const writeFile = (filePath, contents = '', overwrite = false) => { | ||
if (isFile(filePath) && !overwrite) { return false; } | ||
if (!isFolder(path.dirname(filePath) && | ||
(!createPath || !createPath(path.dirname(filePath))))) { return false; } | ||
if (!isFolder(path.dirname(filePath)) && !createPath(path.dirname(filePath))) { | ||
return false; | ||
} | ||
try { | ||
@@ -90,0 +91,0 @@ fs.writeFileSync(filePath, String(contents)); |
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
1807
71673