Javascript Data Type Checker Is Regex

Description

Javascript Data Type Checker Is Regex



// Checks to see if something is a regex
Object.isRegex = function(obj) {
    return (typeof obj == 'object' && obj.constructor == RegExp)
}



PreviousNext

Related