msngr.js
function (inputs) {
        var props = { };

        // Create a function to call with simple and hard types
        // This is done so simple types don't need to check for hard types
        var generateProps = function (types, hard) {
            for (var t in types) {
                if (types.hasOwnProperty(t)) {
                    (function (prop) {
                        Object.defineProperty(props, prop, {
                            get: function () {
                                for (var i = 0; i < inputs.length; ++i) {
                                    if (!checkType(prop, inputs[i], hard)) {
                                        return false;
                                    }
                                }
                                return true;
                            }
                        });
                    }(t));
                }
            }
        };

        generateProps(simpleTypes, false);
        generateProps(harderTypes, true);

        // Check whether the specified inputs even exist
        Object.defineProperty(props, "there", {
            get: function () {
                for (var i = 0; i < inputs.length; ++i) {
                    if (inputs[i] === undefined || inputs[i] === null) {
                        return false;
                    }
                }
                return true;
            }
        });

        // Check whether a passed in input is considered empty or not
        Object.defineProperty(props, "empty", {
            get: function () {
                for (var i = 0; i < inputs.length; ++i) {
                    if (!checkEmpty(getType(inputs[i]), inputs[i])) {
                        return false;
                    }
                }
                return true;
            }
        });

        return props;
    }
function (inputs) {
        var props = { };

        // Create a function to call with simple and hard types
        // This is done so simple types don't need to check for hard types
        var generateProps = function (types, hard) {
            for (var t in types) {
                if (types.hasOwnProperty(t)) {
                    (function (prop) {
                        Object.defineProperty(props, prop, {
                            get: function () {
                                for (var i = 0; i < inputs.length; ++i) {
                                    if (!checkType(prop, inputs[i], hard)) {
                                        return false;
                                    }
                                }
                                return true;
                            }
                        });
                    }(t));
                }
            }
        };

        generateProps(simpleTypes, false);
        generateProps(harderTypes, true);

        // Check whether the specified inputs even exist
        Object.defineProperty(props, "there", {
            get: function () {
                for (var i = 0; i < inputs.length; ++i) {
                    if (inputs[i] === undefined || inputs[i] === null) {
                        return false;
                    }
                }
                return true;
            }
        });

        // Check whether a passed in input is considered empty or not
        Object.defineProperty(props, "empty", {
            get: function () {
                for (var i = 0; i < inputs.length; ++i) {
                    if (!checkEmpty(getType(inputs[i]), inputs[i])) {
                        return false;
                    }
                }
                return true;
            }
        });

        return props;
    }
function ( inputs ) { var props = { } ; // Create a function to call with simple and hard types // This is done so simple types don't need to check for hard types var generateProps = function ( types , hard ) { for ( var t in types ) { if ( types . hasOwnProperty ( t ) ) { ( function ( prop ) { Object . defineProperty ( props , prop , { get : function ( ) { for ( var i = 0 ; i < inputs . length ; ++ i ) { if ( ! checkType ( prop , inputs [ i ] , hard ) ) { return false ; } } return true ; } } ) ; } ( t ) ) ; } } } ; generateProps ( simpleTypes , false ) ; generateProps ( harderTypes , true ) ; // Check whether the specified inputs even exist Object . defineProperty ( props , "there" , { get : function ( ) { for ( var i = 0 ; i < inputs . length ; ++ i ) { if ( inputs [ i ] === undefined || inputs [ i ] === null ) { return false ; } } return true ; } } ) ; // Check whether a passed in input is considered empty or not Object . defineProperty ( props , "empty" , { get : function ( ) { for ( var i = 0 ; i < inputs . length ; ++ i ) { if ( ! checkEmpty ( getType ( inputs [ i ] ) , inputs [ i ] ) ) { return false ; } } return true ; } } ) ; return props ; }
Bulld the properties that the is function returns for testing values
Bulld the properties that the is function returns for testing values