mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 00:57:48 +00:00
Move internal modules to “internal” folder.
This commit is contained in:
18
.internal/baseIsRegExp.js
Normal file
18
.internal/baseIsRegExp.js
Normal file
@@ -0,0 +1,18 @@
|
||||
import baseGetTag from './.internal/baseGetTag.js';
|
||||
import isObjectLike from './isObjectLike.js';
|
||||
|
||||
/** `Object#toString` result references. */
|
||||
const 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;
|
||||
}
|
||||
|
||||
export default baseIsRegExp;
|
||||
Reference in New Issue
Block a user