mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-25 09:55:15 +00:00
28 lines
644 B
JavaScript
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;
|