-
Notifications
You must be signed in to change notification settings - Fork 578
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: remove completeMultipartUpload encryption header (#718)
close #715
- Loading branch information
1 parent
4e137d4
commit 0ed0d57
Showing
4 changed files
with
50 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
module.exports = function deepCopy(obj, cache = []) { | ||
if (obj === null || typeof obj !== 'object') { | ||
return obj; | ||
} | ||
const hit = cache.filter(c => c.original === obj)[0]; | ||
if (hit) { | ||
return hit.copy; | ||
} | ||
const copy = Array.isArray(obj) ? [] : {}; | ||
cache.push({ | ||
original: obj, | ||
copy | ||
}); | ||
|
||
Object.keys(obj).forEach((key) => { | ||
copy[key] = deepCopy(obj[key], cache); | ||
}); | ||
|
||
return copy; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters