| 1347 | // length is at least equal to `width`. The `width` must be <= 6. |
| 1348 | var leadingZeroes = "000000"; |
| 1349 | var toPaddedString = function (width, value) { |
| 1350 | // The `|| 0` expression is necessary to work around a bug in |
| 1351 | // Opera <= 7.54u2 where `0 == -0`, but `String(-0) !== "0"`. |
| 1352 | return (leadingZeroes + (value || 0)).slice(-width); |
| 1353 | }; |
| 1354 | |
| 1355 | // Internal: Double-quotes a string `value`, replacing all ASCII control |
| 1356 | // characters (characters with code unit values between 0 and 31) with |