lib/observe-utils.js
function isPositiveFiniteInteger(value, errorMessage) {
        value = Number(value);
        if (isNaN(value) || !isFinite(value) || value < 0 || value % 1 !== 0) {
            throw new RangeError(errorMessage.replace('$', value));
        }
        return value;
    }
function isPositiveFiniteInteger(value, errorMessage) {
        value = Number(value);
        if (isNaN(value) || !isFinite(value) || value < 0 || value % 1 !== 0) {
            throw new RangeError(errorMessage.replace('$', value));
        }
        return value;
    }
function isPositiveFiniteInteger ( value , errorMessage ) { value = Number ( value ) ; if ( isNaN ( value ) || ! isFinite ( value ) || value < 0 || value % 1 !== 0 ) { throw new RangeError ( errorMessage . replace ( '$' , value ) ) ; } return value ; }
cast a value as number, and test if the obtained result is a positive finite integer, throw an error otherwise
cast a value as number and test if the obtained result is a positive finite integer throw an error otherwise