зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1330006 - Fix space-infix-ops eslint. r=till
This commit is contained in:
Родитель
122ebc553b
Коммит
e0ca7bce95
|
@ -791,7 +791,7 @@ function ArrayKeys() {
|
|||
}
|
||||
|
||||
// ES 2017 draft 0f10dba4ad18de92d47d421f378233a2eae8f077 22.1.2.1
|
||||
function ArrayFrom(items, mapfn=undefined, thisArg=undefined) {
|
||||
function ArrayFrom(items, mapfn = undefined, thisArg = undefined) {
|
||||
// Step 1.
|
||||
var C = this;
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ function SortByColumn(array, len, aux, col) {
|
|||
|
||||
// Transform counts to indices.
|
||||
for (let r = 0; r < R; r++) {
|
||||
counts[r+1] += counts[r];
|
||||
counts[r + 1] += counts[r];
|
||||
}
|
||||
|
||||
// Distribute
|
||||
|
@ -212,13 +212,13 @@ function Merge(list, start, mid, end, lBuffer, rBuffer, comparefn) {
|
|||
|
||||
// Empty out any remaining elements in the buffer.
|
||||
while (i < sizeLeft) {
|
||||
list[k] =lBuffer[i];
|
||||
list[k] = lBuffer[i];
|
||||
i++;
|
||||
k++;
|
||||
}
|
||||
|
||||
while (j < sizeRight) {
|
||||
list[k] =rBuffer[j];
|
||||
list[k] = rBuffer[j];
|
||||
j++;
|
||||
k++;
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ function String_generic_match(thisValue, regexp) {
|
|||
* A helper function implementing the logic for both String.prototype.padStart
|
||||
* and String.prototype.padEnd as described in ES7 Draft March 29, 2016
|
||||
*/
|
||||
function String_pad(maxLength, fillString, padEnd=false) {
|
||||
function String_pad(maxLength, fillString, padEnd = false) {
|
||||
|
||||
// Steps 1-2.
|
||||
RequireObjectCoercible(this);
|
||||
|
@ -105,11 +105,11 @@ function String_pad(maxLength, fillString, padEnd=false) {
|
|||
return truncatedStringFiller + str;
|
||||
}
|
||||
|
||||
function String_pad_start(maxLength, fillString=" ") {
|
||||
function String_pad_start(maxLength, fillString = " ") {
|
||||
return callFunction(String_pad, this, maxLength, fillString, false);
|
||||
}
|
||||
|
||||
function String_pad_end(maxLength, fillString=" ") {
|
||||
function String_pad_end(maxLength, fillString = " ") {
|
||||
return callFunction(String_pad, this, maxLength, fillString, true);
|
||||
}
|
||||
|
||||
|
|
|
@ -1094,7 +1094,7 @@ function TypedArrayCompare(x, y) {
|
|||
|
||||
// Steps 8-9.
|
||||
if (x === 0 && y === 0)
|
||||
return (1/x > 0 ? 1 : 0) - (1/y > 0 ? 1 : 0);
|
||||
return ((1 / x) > 0 ? 1 : 0) - ((1 / y) > 0 ? 1 : 0);
|
||||
|
||||
// Steps 3-4.
|
||||
if (Number_isNaN(x))
|
||||
|
@ -1109,7 +1109,7 @@ function TypedArrayCompareInt(x, y) {
|
|||
// Step 1.
|
||||
assert(typeof x === "number" && typeof y === "number",
|
||||
"x and y are not numbers.");
|
||||
assert((x === (x|0) || x === (x>>>0)) && (y === (y|0) || y === (y>>>0)),
|
||||
assert((x === (x | 0) || x === (x >>> 0)) && (y === (y | 0) || y === (y >>> 0)),
|
||||
"x and y are not int32/uint32 numbers.");
|
||||
|
||||
// Step 2 (Implemented in TypedArraySort).
|
||||
|
|
Загрузка…
Ссылка в новой задаче