MCPcopy Index your code
hub / github.com/PrairieLearn/PrairieLearn / toPaddedString

Function toPaddedString

public/javascripts/socket.io.js:2304–2308  ·  view source on GitHub ↗
(width, value)

Source from the content-addressed store, hash-verified

2302 // length is at least equal to `width`. The `width` must be <= 6.
2303 var leadingZeroes = "000000";
2304 var toPaddedString = function (width, value) {
2305 // The `|| 0` expression is necessary to work around a bug in
2306 // Opera <= 7.54u2 where `0 == -0`, but `String(-0) !== "0"`.
2307 return (leadingZeroes + (value || 0)).slice(-width);
2308 };
2309
2310 // Internal: Double-quotes a string `value`, replacing all ASCII control
2311 // characters (characters with code unit values between 0 and 31) with

Callers 2

quoteFunction · 0.85
serializeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected