Comparing version 1.0.1 to 1.0.2
@@ -98,3 +98,3 @@ "use strict"; | ||
for (let i=0; i < _dirList.length; i++) { | ||
let { root, prefix } = getRootAndPrefix(_dirList[i]); | ||
let { root, prefix, getDestinationPath } = getRootAndPrefix(_dirList[i]); | ||
if (!root) { | ||
@@ -108,3 +108,5 @@ throw new Error('FSReader must be instatiated with string or object'); | ||
hashStore = curEntryList.reduce((hashStoreAccumulated, entry) => { | ||
hashStoreAccumulated[path.join(entry.relativePath, prefix)] = entry; | ||
let relativePath = getDestinationPath ? getDestinationPath(entry.relativePath) : entry.relativePath; | ||
relativePath = prefix ? path.join(relativePath, prefix) : relativePath; | ||
hashStoreAccumulated[relativePath] = entry; | ||
return hashStoreAccumulated; | ||
@@ -111,0 +113,0 @@ }, hashStore); |
{ | ||
"name": "fs-merger", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Reads files from a real location", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -70,2 +70,3 @@ "use strict"; | ||
prefix: 'test-2', | ||
getDestinationPath: undefined | ||
}, { | ||
@@ -78,3 +79,4 @@ outputPath: 'fixtures/test-3' | ||
path: 'fixtures/test-1/x.txt', | ||
prefix: '' | ||
prefix: '', | ||
getDestinationPath: '', | ||
}); | ||
@@ -86,3 +88,4 @@ }); | ||
path: 'fixtures/test-2/c.txt', | ||
prefix: 'test-2' | ||
prefix: 'test-2', | ||
getDestinationPath: undefined, | ||
}); | ||
@@ -94,3 +97,4 @@ }); | ||
path: 'fixtures/test-3/d.txt', | ||
prefix: '' | ||
prefix: '', | ||
getDestinationPath: undefined, | ||
}) | ||
@@ -97,0 +101,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
10332
5
267