src/static/js/Intl.js
function /* 9.2.10 */$$core$$GetNumberOption (options, property, minimum, maximum, fallback) {
        var
            // 1. Let value be the result of calling the [[Get]] internal method of
            //    options with argument property.
            value = options[property];

        // 2. If value is not undefined, then
        if (value !== undefined) {
            // a. Let value be ToNumber(value).
            value = Number(value);

            // b. If value is NaN or less than minimum or greater than maximum, throw a
            //    RangeError exception.
            if (isNaN(value) || value < minimum || value > maximum)
                throw new RangeError('Value is not a number or outside accepted range');

            // c. Return floor(value).
            return Math.floor(value);
        }
        // 3. Else return fallback.
        return fallback;
    }
function /* 9.2.10 */$$core$$GetNumberOption (options, property, minimum, maximum, fallback) {
        var
            // 1. Let value be the result of calling the [[Get]] internal method of
            //    options with argument property.
            value = options[property];

        // 2. If value is not undefined, then
        if (value !== undefined) {
            // a. Let value be ToNumber(value).
            value = Number(value);

            // b. If value is NaN or less than minimum or greater than maximum, throw a
            //    RangeError exception.
            if (isNaN(value) || value < minimum || value > maximum)
                throw new RangeError('Value is not a number or outside accepted range');

            // c. Return floor(value).
            return Math.floor(value);
        }
        // 3. Else return fallback.
        return fallback;
    }
function /* 9.2.10 */ $$core$$GetNumberOption ( options , property , minimum , maximum , fallback ) { var // 1. Let value be the result of calling the [[Get]] internal method of //    options with argument property. value = options [ property ] ; // 2. If value is not undefined, then if ( value !== undefined ) { // a. Let value be ToNumber(value). value = Number ( value ) ; // b. If value is NaN or less than minimum or greater than maximum, throw a //    RangeError exception. if ( isNaN ( value ) || value < minimum || value > maximum ) throw new RangeError ( 'Value is not a number or outside accepted range' ) ; // c. Return floor(value). return Math . floor ( value ) ; } // 3. Else return fallback. return fallback ; }
The GetNumberOption abstract operation extracts a property value from the
provided options object, converts it to a Number value, checks whether it is
in the allowed range, and fills in a fallback value if necessary.
The GetNumberOption abstract operation extracts a property value from the provided options object converts it to a Number value checks whether it is in the allowed range and fills in a fallback value if necessary .