Skip to content

Commit cd1e281

Browse files
committed
[Refactor] avoid using a sparse array.
1 parent ded2c78 commit cd1e281

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/utils.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
'use strict';
22

33
var hexTable = (function () {
4-
var array = new Array(256);
4+
var array = [];
55
for (var i = 0; i < 256; ++i) {
6-
array[i] = '%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase();
6+
array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
77
}
88

99
return array;

0 commit comments

Comments
 (0)