cleaner-node
Advanced tools
Comparing version 0.4.10 to 0.4.11
{ | ||
"name": "cleaner-node", | ||
"version": "0.4.10", | ||
"version": "0.4.11", | ||
"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", |
@@ -130,9 +130,8 @@ const fs = require('fs'); | ||
const folderStructureChildren = (parent, parentPath, childNames, calculateChecksums) => { | ||
[].concat(childNames).filter(name => (isValidString(name))).forEach(childName => { | ||
const childPath = path.join(parentPath, childName); | ||
const folderStructureChildren = (parent, childPaths, calculateChecksums) => { | ||
[].concat(childPaths).filter(name => (isValidString(name))).forEach(childPath => { | ||
const stats = getStats(childPath); | ||
if (stats && (stats.isDirectory() || stats.isFile())) { | ||
const child = { | ||
name : childName, | ||
name : path.basename(childPath), | ||
type : (stats.isDirectory() ? 'D' : 'F'), | ||
@@ -152,3 +151,3 @@ size : stats.size, | ||
const children = folderContents(childPath); | ||
folderStructureChildren(child, childPath, children); | ||
folderStructureChildren(child, children, calculateChecksums); | ||
} | ||
@@ -163,3 +162,3 @@ } | ||
path : folderPath, | ||
name : stats.name, | ||
name : path.basename(folderPath), | ||
type : 'D', | ||
@@ -170,4 +169,4 @@ size : stats.size, | ||
}; | ||
const children = folderContents(folderPath); | ||
folderStructureChildren(root, folderPath, children, calculateChecksums); | ||
const childPaths = folderContents(folderPath); | ||
folderStructureChildren(root, childPaths, calculateChecksums); | ||
return root; | ||
@@ -174,0 +173,0 @@ } |
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
54708
1309