MCPcopy Index your code
hub / github.com/nodejs/node / appendBase64VLQ

Function appendBase64VLQ

test/fixtures/snapshot/typescript.js:90242–90264  ·  view source on GitHub ↗
(inValue)

Source from the content-addressed store, hash-verified

90240 };
90241 }
90242 function appendBase64VLQ(inValue) {
90243 // Add a new least significant bit that has the sign of the value.
90244 // if negative number the least significant bit that gets added to the number has value 1
90245 // else least significant bit value that gets added is 0
90246 // eg. -1 changes to binary : 01 [1] => 3
90247 // +1 changes to binary : 01 [0] => 2
90248 if (inValue < 0) {
90249 inValue = ((-inValue) << 1) + 1;
90250 }
90251 else {
90252 inValue = inValue << 1;
90253 }
90254 // Encode 5 bits at a time starting from least significant bits
90255 do {
90256 var currentDigit = inValue & 31; // 11111
90257 inValue = inValue >> 5;
90258 if (inValue > 0) {
90259 // There are still more digits to decode, set the msb (6th bit)
90260 currentDigit = currentDigit | 32;
90261 }
90262 appendMappingCharCode(base64FormatEncode(currentDigit));
90263 } while (inValue > 0);
90264 }
90265 }
90266 ts.createSourceMapGenerator = createSourceMapGenerator;
90267 // Sometimes tools can see the following line as a source mapping url comment, so we mangle it a bit (the [M])

Callers 1

commitPendingMappingFunction · 0.85

Calls 2

appendMappingCharCodeFunction · 0.85
base64FormatEncodeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…