Skip to content

Commit

Permalink
lib: remove unused join from internal/util
Browse files Browse the repository at this point in the history
  • Loading branch information
anonrig committed Nov 23, 2022
1 parent 9602664 commit 09de49a
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions lib/internal/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -385,21 +385,6 @@ function promisify(original) {

promisify.custom = kCustomPromisifiedSymbol;

// The built-in Array#join is slower in v8 6.0
function join(output, separator) {
let str = '';
if (output.length !== 0) {
const lastIndex = output.length - 1;
for (let i = 0; i < lastIndex; i++) {
// It is faster not to use a template string here
str += output[i];
str += separator;
}
str += output[lastIndex];
}
return str;
}

// As of V8 6.6, depending on the size of the array, this is anywhere
// between 1.5-10x faster than the two-arg version of Array#splice()
function spliceOne(list, index) {
Expand Down Expand Up @@ -579,7 +564,6 @@ module.exports = {
getSystemErrorName,
isError,
isInsideNodeModules,
join,
lazyDOMException,
lazyDOMExceptionClass,
normalizeEncoding,
Expand Down

0 comments on commit 09de49a

Please sign in to comment.