src/third_party/mozjs/extract/js/src/builtin/intl/CommonFunctions.js
/**
 * The abstract operation DefaultNumberOption converts value to a Number value,
 * checks whether it is in the allowed range, and fills in a fallback value if
 * necessary.
 *
 * Spec: ECMAScript Internationalization API Specification, 9.2.11.
 */
The abstract operation DefaultNumberOption converts value to a Number value,
checks whether it is in the allowed range, and fills in a fallback value if
necessary.

ECMAScript Internationalization API Specification, 9.2.11.
The abstract operation DefaultNumberOption converts value to a Number value checks whether it is in the allowed range and fills in a fallback value if necessary . ECMAScript Internationalization API Specification 9 . 2 . 11 .
function DefaultNumberOption(value, minimum, maximum, fallback) {
    assert(typeof minimum === "number" && (minimum | 0) === minimum, "DefaultNumberOption");
    assert(typeof maximum === "number" && (maximum | 0) === maximum, "DefaultNumberOption");
    assert(fallback === undefined || (typeof fallback === "number" && (fallback | 0) === fallback),
           "DefaultNumberOption");
    assert(fallback === undefined || (minimum <= fallback && fallback <= maximum),
           "DefaultNumberOption");
    if (value === undefined)
        return fallback;
    value = ToNumber(value);
    if (Number_isNaN(value) || value < minimum || value > maximum)
        ThrowRangeError(JSMSG_INVALID_DIGITS_VALUE, value);
    return std_Math_floor(value) | 0;
}
function DefaultNumberOption ( value , minimum , maximum , fallback ) { assert ( typeof minimum === "number" && ( minimum | 0 ) === minimum , "DefaultNumberOption" ) ; assert ( typeof maximum === "number" && ( maximum | 0 ) === maximum , "DefaultNumberOption" ) ; assert ( fallback === undefined || ( typeof fallback === "number" && ( fallback | 0 ) === fallback ) , "DefaultNumberOption" ) ; assert ( fallback === undefined || ( minimum <= fallback && fallback <= maximum ) , "DefaultNumberOption" ) ; if ( value === undefined ) return fallback ; value = ToNumber ( value ) ; if ( Number_isNaN ( value ) || value < minimum || value > maximum ) ThrowRangeError ( JSMSG_INVALID_DIGITS_VALUE , value ) ; return std_Math_floor ( value ) | 0 ; }
The abstract operation DefaultNumberOption converts value to a Number value,
 checks whether it is in the allowed range, and fills in a fallback value if
 necessary.
The abstract operation DefaultNumberOption converts value to a Number value checks whether it is in the allowed range and fills in a fallback value if necessary .
// Step 1. // Step 2. // Step 3. // Step 4. // Apply bitwise-or to convert -0 to +0 per ES2017, 5.2 and to ensure the // result is an int32 value.