We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8b1a13a commit 7715d6bCopy full SHA for 7715d6b
src/index.ts
@@ -72,17 +72,9 @@ export const createArchive =
72
* pass it to an array. Finally returns this array.
73
*/
74
function onprogress(data: string) {
75
- let entries: string[] = [];
76
- data.split('\n').forEach(function (line) {
77
- if (line.substr(0, 1) === '+') {
78
- entries.push(
79
- ReplaceNativeSeparator(
80
- line.substr(2, line.length)
81
- )
82
- );
83
- }
84
- });
85
- return entries;
+ return data.split('\n')
+ .filter((line) => line.startsWith('+'))
+ .map((line) => ReplaceNativeSeparator(line.slice(2)));
86
}
87
88
// Convert array of files into a string if needed.
0 commit comments