Skip to content

Instantly share code, notes, and snippets.

View razorthink-com's full-sized avatar

razorthink-com

  • Razorthink
View GitHub Profile
function validateTypes( type, value, shouldLog ) {
/* --------- Type Checker --------- */
function _typeOf( item ) {
return Object.prototype.toString.call( item ).slice( 8, -1 );
}
function checkPrimitiveType( type, value, errorLog ) {
var isValid = ( type == _typeOf( value ) );