aboutsummaryrefslogtreecommitdiff
path: root/node_modules/lodash/_baseIsRegExp.js
blob: 6cd7c1aee733cd186ba5835bc8e7d94f763ca9db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
var baseGetTag = require('./_baseGetTag'),
    isObjectLike = require('./isObjectLike');

/** `Object#toString` result references. */
var regexpTag = '[object RegExp]';

/**
 * The base implementation of `_.isRegExp` without Node.js optimizations.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
 */
function baseIsRegExp(value) {
  return isObjectLike(value) && baseGetTag(value) == regexpTag;
}

module.exports = baseIsRegExp;