Skip to content
This repository has been archived by the owner on Jun 18, 2020. It is now read-only.

error when array have a custom prototype #165

Closed
Jackcu opened this issue Mar 14, 2014 · 0 comments
Closed

error when array have a custom prototype #165

Jackcu opened this issue Mar 14, 2014 · 0 comments

Comments

@Jackcu
Copy link

Jackcu commented Mar 14, 2014

 Array.prototype.contains = function (obj) {

        var i = this.length;
        while (i--) {
            if (this[i] === obj) {
                return true;
            }
        }

    }

function validateParameters( parameters, funcName ) {

for( var p in parameters ) {

    if ( isNaN( p ) ) continue;//myself code

    if( typeof parameters[p].value != parameters[p].type ) {

        throw new Error( ["[msnodesql] Invalid ", parameters[p].name, " passed to function ", funcName, ". Type should be ", parameters[p].type, "." ].join('') );
    }
}

}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants