GoScrobble/web/node_modules/lodash-es/isRegExp.js

28 lines
644 B
JavaScript

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;