Refactor join.

This commit is contained in:
David Braun 2019-04-06 09:30:35 -04:00
parent 3d17e23338
commit 43b09b0c58
No known key found for this signature in database
GPG key ID: 87EC41ADF710B7E2

View file

@ -186,15 +186,7 @@ const Channel = function(length = 0) {
} }
}, },
join: async separator => { join: async separator => (await readOnly.values()).join(separator),
const elements = [];
await readOnly.forEach(element => {
elements.push(element);
});
return elements.join(separator);
},
map: (callbackfn, thisArg) => { map: (callbackfn, thisArg) => {
const output = Channel(); const output = Channel();