1 var isObject = require('./isObject');
3 /** `Object#toString` result references. */
4 var regexpTag = '[object RegExp]';
6 /** Used for built-in method references. */
7 var objectProto = global.Object.prototype;
10 * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
13 var objectToString = objectProto.toString;
16 * Checks if `value` is classified as a `RegExp` object.
21 * @param {*} value The value to check.
22 * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
28 * _.isRegExp('/abc/');
31 function isRegExp(value) {
32 return isObject(value) && objectToString.call(value) == regexpTag;
35 module.exports = isRegExp;