dist/jquery.documentsize.js
function isVisualViewport ( name ) {
        var viewport = isString( name ) && name.toLowerCase();

        if ( name && !viewport ) throw new Error( "Invalid viewport option: " + name );
        if ( viewport && viewport !== "visual" && viewport !== "layout" ) throw new Error( "Invalid viewport name: " + name );

        return viewport === "visual";
    }
function isVisualViewport ( name ) {
        var viewport = isString( name ) && name.toLowerCase();

        if ( name && !viewport ) throw new Error( "Invalid viewport option: " + name );
        if ( viewport && viewport !== "visual" && viewport !== "layout" ) throw new Error( "Invalid viewport name: " + name );

        return viewport === "visual";
    }
function isVisualViewport ( name ) { var viewport = isString ( name ) && name . toLowerCase ( ) ; if ( name && ! viewport ) throw new Error ( "Invalid viewport option: " + name ) ; if ( viewport && viewport !== "visual" && viewport !== "layout" ) throw new Error ( "Invalid viewport name: " + name ) ; return viewport === "visual" ; }
Checks if the argument is the name of the visual viewport. The check is case-insensitive.

Expects a string. Tolerates falsy values, returning false then (argument is not naming the visual viewport).
Throws an error for everything else. Also throws an error if the viewport name is a string but not recognized
(typo alert).

Helper for getWindowQueryConfig().

@param   {string} [name]  strings "visual", "layout" (case-insensitive)
@returns {boolean}
Checks if the argument is the name of the visual viewport . The check is case - insensitive .