File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -252,6 +252,20 @@ function promisify(orig) {
252
252
253
253
promisify . custom = kCustomPromisifiedSymbol ;
254
254
255
+ // The build-in Array#join is slower in v8 6.0
256
+ function join ( output , separator ) {
257
+ var str = '' ;
258
+ if ( output . length !== 0 ) {
259
+ for ( var i = 0 ; i < output . length - 1 ; i ++ ) {
260
+ // It is faster not to use a template string here
261
+ str += output [ i ] ;
262
+ str += separator ;
263
+ }
264
+ str += output [ i ] ;
265
+ }
266
+ return str ;
267
+ }
268
+
255
269
module . exports = {
256
270
assertCrypto,
257
271
cachedResult,
@@ -265,6 +279,7 @@ module.exports = {
265
279
normalizeEncoding,
266
280
objectToString,
267
281
promisify,
282
+ join,
268
283
269
284
// Symbol used to customize promisify conversion
270
285
customPromisifyArgs : kCustomPromisifyArgsSymbol ,
You can’t perform that action at this time.
0 commit comments