demo/load-event/js/libs/jquery.isinview/jquery.isinview-1.0.3.js
function checkOptions ( opts ) {
        var isNum, isNumWithUnit;

        if ( opts.direction && !( opts.direction === 'vertical' || opts.direction === 'horizontal' || opts.direction === 'both' ) ) {
            throw new Error( 'Invalid option value: direction = "' + opts.direction + '"' );
        }

        if ( opts.box && !( opts.box === 'border-box' || opts.box === 'content-box' ) ) {
            throw new Error( 'Invalid option value: box = "' + opts.box + '"' );
        }

        if ( opts.tolerance !== undefined ) {
            isNum = isNumber( opts.tolerance );
            isNumWithUnit = isString( opts.tolerance ) && ( /^[+-]?\d*\.?\d+(px|%)?$/.test( opts.tolerance ) );
            if ( ! ( isNum || isNumWithUnit ) ) throw new Error( 'Invalid option value: tolerance = "' + opts.tolerance + '"' );
        }

    }
function checkOptions ( opts ) {
        var isNum, isNumWithUnit;

        if ( opts.direction && !( opts.direction === 'vertical' || opts.direction === 'horizontal' || opts.direction === 'both' ) ) {
            throw new Error( 'Invalid option value: direction = "' + opts.direction + '"' );
        }

        if ( opts.box && !( opts.box === 'border-box' || opts.box === 'content-box' ) ) {
            throw new Error( 'Invalid option value: box = "' + opts.box + '"' );
        }

        if ( opts.tolerance !== undefined ) {
            isNum = isNumber( opts.tolerance );
            isNumWithUnit = isString( opts.tolerance ) && ( /^[+-]?\d*\.?\d+(px|%)?$/.test( opts.tolerance ) );
            if ( ! ( isNum || isNumWithUnit ) ) throw new Error( 'Invalid option value: tolerance = "' + opts.tolerance + '"' );
        }

    }
function checkOptions ( opts ) { var isNum , isNumWithUnit ; if ( opts . direction && ! ( opts . direction === 'vertical' || opts . direction === 'horizontal' || opts . direction === 'both' ) ) { throw new Error ( 'Invalid option value: direction = "' + opts . direction + '"' ) ; } if ( opts . box && ! ( opts . box === 'border-box' || opts . box === 'content-box' ) ) { throw new Error ( 'Invalid option value: box = "' + opts . box + '"' ) ; } if ( opts . tolerance !== undefined ) { isNum = isNumber ( opts . tolerance ) ; isNumWithUnit = isString ( opts . tolerance ) && ( / ^[+-]?\d*\.?\d+(px|%)?$ / . test ( opts . tolerance ) ) ; if ( ! ( isNum || isNumWithUnit ) ) throw new Error ( 'Invalid option value: tolerance = "' + opts . tolerance + '"' ) ; } }
Spots likely option mistakes and throws appropriate errors.

@param {Object} opts
Spots likely option mistakes and throws appropriate errors .