You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
644 B
28 lines
644 B
import baseIsRegExp from './_baseIsRegExp.js';
|
|
import baseUnary from './_baseUnary.js';
|
|
import nodeUtil from './_nodeUtil.js';
|
|
|
|
/* Node.js helper references. */
|
|
var nodeIsRegExp = nodeUtil && nodeUtil.isRegExp;
|
|
|
|
/**
|
|
* Checks if `value` is classified as a `RegExp` object.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
|
|
* @example
|
|
*
|
|
* _.isRegExp(/abc/);
|
|
* // => true
|
|
*
|
|
* _.isRegExp('/abc/');
|
|
* // => false
|
|
*/
|
|
var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
|
|
|
|
export default isRegExp;
|