objectwithProperties(input, properties){
        if(!this.nonEmptyArray(properties)){
            throw new TypeError('properties is not a nonEmptyArray');
        }

        if(!this.isObject(input)){
            return false;
        }

        for (var i = 0; i < properties.length; i++){
            if(!input.hasOwnProperty(properties[i])){
                return false;
            }
        }

        return true;
    }
/**
     * Checks if a variable is an object, and has the given properties
     * 
     * @param {mixed} input - the variable to test.
     * @param {array} properties - the properties the object is required to have. 
     * example - ['name', 'description', 'path']
     * @throws {TypeError} If properties isn't an array
     * @returns {boolean} if the input an object and has the required propertied
     */
Checks if a variable is an object, and has the given properties

@param {mixed} input - the variable to test.
@param {array} properties - the properties the object is required to have.
Checks if a variable is an object and has the given properties @param { mixed } input - the variable to test . @param { array } properties - the properties the object is required to have .
objectwithProperties(input, properties){
        if(!this.nonEmptyArray(properties)){
            throw new TypeError('properties is not a nonEmptyArray');
        }
        if(!this.isObject(input)){
            return false;
        }
        for (var i = 0; i < properties.length; i++){
            if(!input.hasOwnProperty(properties[i])){
                return false;
            }
        }
        return true;
    }
objectwithProperties ( input , properties ) { if ( ! this . nonEmptyArray ( properties ) ) { throw new TypeError ( 'properties is not a nonEmptyArray' ) ; } if ( ! this . isObject ( input ) ) { return false ; } for ( var i = 0 ; i < properties . length ; i ++ ) { if ( ! input . hasOwnProperty ( properties [ i ] ) ) { return false ; } } return true ; }
Checks if a variable is an object, and has the given properties
Checks if a variable is an object and has the given properties