generate.js
function isGetSet(obj) {
        var keys, length;
        if (obj && typeof obj === 'object') {
            keys = Object.getOwnPropertyNames(obj)
                .sort();
            length = keys.length;

            if ((length === 1 && (keys[0] === 'get' && typeof obj.get ===
                    'function' ||
                    keys[0] === 'set' && typeof obj.set === 'function'
                )) ||
                (length === 2 && (keys[0] === 'get' && typeof obj.get ===
                    'function' &&
                    keys[1] === 'set' && typeof obj.set === 'function'
                ))) {
                return true;
            }
        }
        return false;
    }
function isGetSet(obj) {
        var keys, length;
        if (obj && typeof obj === 'object') {
            keys = Object.getOwnPropertyNames(obj)
                .sort();
            length = keys.length;

            if ((length === 1 && (keys[0] === 'get' && typeof obj.get ===
                    'function' ||
                    keys[0] === 'set' && typeof obj.set === 'function'
                )) ||
                (length === 2 && (keys[0] === 'get' && typeof obj.get ===
                    'function' &&
                    keys[1] === 'set' && typeof obj.set === 'function'
                ))) {
                return true;
            }
        }
        return false;
    }
function isGetSet ( obj ) { var keys , length ; if ( obj && typeof obj === 'object' ) { keys = Object . getOwnPropertyNames ( obj ) . sort ( ) ; length = keys . length ; if ( ( length === 1 && ( keys [ 0 ] === 'get' && typeof obj . get === 'function' || keys [ 0 ] === 'set' && typeof obj . set === 'function' ) ) || ( length === 2 && ( keys [ 0 ] === 'get' && typeof obj . get === 'function' && keys [ 1 ] === 'set' && typeof obj . set === 'function' ) ) ) { return true ; } } return false ; }
Returns true if 'obj' is an object containing only get and set functions, false otherwise.
@param  {Any} obj Value to be tested.
@return {Boolean} true or false.
Returns true if obj is an object containing only get and set functions false otherwise .