main
Last change
on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
644 bytes
|
Rev | Line | |
---|
[d565449] | 1 | import baseIsRegExp from './_baseIsRegExp.js';
|
---|
| 2 | import baseUnary from './_baseUnary.js';
|
---|
| 3 | import nodeUtil from './_nodeUtil.js';
|
---|
| 4 |
|
---|
| 5 | /* Node.js helper references. */
|
---|
| 6 | var nodeIsRegExp = nodeUtil && nodeUtil.isRegExp;
|
---|
| 7 |
|
---|
| 8 | /**
|
---|
| 9 | * Checks if `value` is classified as a `RegExp` object.
|
---|
| 10 | *
|
---|
| 11 | * @static
|
---|
| 12 | * @memberOf _
|
---|
| 13 | * @since 0.1.0
|
---|
| 14 | * @category Lang
|
---|
| 15 | * @param {*} value The value to check.
|
---|
| 16 | * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
|
---|
| 17 | * @example
|
---|
| 18 | *
|
---|
| 19 | * _.isRegExp(/abc/);
|
---|
| 20 | * // => true
|
---|
| 21 | *
|
---|
| 22 | * _.isRegExp('/abc/');
|
---|
| 23 | * // => false
|
---|
| 24 | */
|
---|
| 25 | var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
|
---|
| 26 |
|
---|
| 27 | export default isRegExp;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.