format: prettify entire project
This commit is contained in:
14
node_modules/source-map/lib/base64-vlq.js
generated
vendored
14
node_modules/source-map/lib/base64-vlq.js
generated
vendored
@ -67,9 +67,7 @@ var VLQ_CONTINUATION_BIT = VLQ_BASE;
|
||||
* 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)
|
||||
*/
|
||||
function toVLQSigned(aValue) {
|
||||
return aValue < 0
|
||||
? ((-aValue) << 1) + 1
|
||||
: (aValue << 1) + 0;
|
||||
return aValue < 0 ? (-aValue << 1) + 1 : (aValue << 1) + 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -81,16 +79,14 @@ function toVLQSigned(aValue) {
|
||||
function fromVLQSigned(aValue) {
|
||||
var isNegative = (aValue & 1) === 1;
|
||||
var shifted = aValue >> 1;
|
||||
return isNegative
|
||||
? -shifted
|
||||
: shifted;
|
||||
return isNegative ? -shifted : shifted;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the base 64 VLQ encoded value.
|
||||
*/
|
||||
exports.encode = function base64VLQ_encode(aValue) {
|
||||
var encoded = "";
|
||||
var encoded = '';
|
||||
var digit;
|
||||
|
||||
var vlq = toVLQSigned(aValue);
|
||||
@ -121,12 +117,12 @@ exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {
|
||||
|
||||
do {
|
||||
if (aIndex >= strLen) {
|
||||
throw new Error("Expected more digits in base 64 VLQ value.");
|
||||
throw new Error('Expected more digits in base 64 VLQ value.');
|
||||
}
|
||||
|
||||
digit = base64.decode(aStr.charCodeAt(aIndex++));
|
||||
if (digit === -1) {
|
||||
throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1));
|
||||
throw new Error('Invalid base64 digit: ' + aStr.charAt(aIndex - 1));
|
||||
}
|
||||
|
||||
continuation = !!(digit & VLQ_CONTINUATION_BIT);
|
||||
|
Reference in New Issue
Block a user