function isRegExp(object) {
    return Object.prototype.toString.call(object) === "[object RegExp]";
}
Cross-window, cross-Node-context regular expression detection
@param  {Object}  object Anything
@return {Boolean}        true if the object is a regular expression,
false otherwise