es-toolkit 1.16.0-dev.467 → 1.16.0-dev.469

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -127,6 +127,7 @@ export { isObjectLike } from './predicate/isObjectLike.mjs';
127
127
  export { isBoolean } from './predicate/isBoolean.mjs';
128
128
  export { isTypedArray } from './predicate/isTypedArray.mjs';
129
129
  export { isMatch } from './predicate/isMatch.mjs';
130
+ export { isRegExp } from './predicate/isRegExp.mjs';
130
131
  export { isString } from './predicate/isString.mjs';
131
132
  export { matches } from './predicate/matches.mjs';
132
133
  export { matchesProperty } from './predicate/matchesProperty.mjs';
@@ -127,6 +127,7 @@ export { isObjectLike } from './predicate/isObjectLike.js';
127
127
  export { isBoolean } from './predicate/isBoolean.js';
128
128
  export { isTypedArray } from './predicate/isTypedArray.js';
129
129
  export { isMatch } from './predicate/isMatch.js';
130
+ export { isRegExp } from './predicate/isRegExp.js';
130
131
  export { isString } from './predicate/isString.js';
131
132
  export { matches } from './predicate/matches.js';
132
133
  export { matchesProperty } from './predicate/matchesProperty.js';
@@ -766,6 +766,10 @@ function isBoolean(x) {
766
766
  return false;
767
767
  }
768
768
 
769
+ function isRegExp(value) {
770
+ return isFunction.getTag(value) === '[object RegExp]';
771
+ }
772
+
769
773
  function isString(value) {
770
774
  if (typeof value === 'string') {
771
775
  return true;
@@ -935,6 +939,7 @@ exports.isArrayLike = isArrayLike;
935
939
  exports.isBoolean = isBoolean;
936
940
  exports.isMatch = isMatch;
937
941
  exports.isPlainObject = isPlainObject;
942
+ exports.isRegExp = isRegExp;
938
943
  exports.isString = isString;
939
944
  exports.isSymbol = isSymbol;
940
945
  exports.isTypedArray = isTypedArray;
@@ -127,6 +127,7 @@ export { isSymbol } from './predicate/isSymbol.mjs';
127
127
  export { isBoolean } from './predicate/isBoolean.mjs';
128
128
  export { isTypedArray } from './predicate/isTypedArray.mjs';
129
129
  export { isMatch } from './predicate/isMatch.mjs';
130
+ export { isRegExp } from './predicate/isRegExp.mjs';
130
131
  export { isString } from './predicate/isString.mjs';
131
132
  export { matches } from './predicate/matches.mjs';
132
133
  export { matchesProperty } from './predicate/matchesProperty.mjs';
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Checks if `value` is a RegExp.
3
+ *
4
+ * @param {unknown} value The value to check.
5
+ * @returns {boolean} Returns `true` if `value` is a RegExp, `false` otherwise.
6
+ */
7
+ declare function isRegExp(value: unknown): value is RegExp;
8
+
9
+ export { isRegExp };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Checks if `value` is a RegExp.
3
+ *
4
+ * @param {unknown} value The value to check.
5
+ * @returns {boolean} Returns `true` if `value` is a RegExp, `false` otherwise.
6
+ */
7
+ declare function isRegExp(value: unknown): value is RegExp;
8
+
9
+ export { isRegExp };
@@ -0,0 +1,7 @@
1
+ import { getTag } from '../_internal/getTag.mjs';
2
+
3
+ function isRegExp(value) {
4
+ return getTag(value) === '[object RegExp]';
5
+ }
6
+
7
+ export { isRegExp };
package/dist/index.d.mts CHANGED
@@ -99,6 +99,7 @@ export { isPlainObject } from './predicate/isPlainObject.mjs';
99
99
  export { isFunction } from './predicate/isFunction.mjs';
100
100
  export { isTypedArray } from './predicate/isTypedArray.mjs';
101
101
  export { isPrimitive } from './predicate/isPrimitive.mjs';
102
+ export { isRegExp } from './predicate/isRegExp.mjs';
102
103
  export { isBoolean } from './predicate/isBoolean.mjs';
103
104
  export { isSymbol } from './predicate/isSymbol.mjs';
104
105
  export { isString } from './predicate/isString.mjs';
package/dist/index.d.ts CHANGED
@@ -99,6 +99,7 @@ export { isPlainObject } from './predicate/isPlainObject.js';
99
99
  export { isFunction } from './predicate/isFunction.js';
100
100
  export { isTypedArray } from './predicate/isTypedArray.js';
101
101
  export { isPrimitive } from './predicate/isPrimitive.js';
102
+ export { isRegExp } from './predicate/isRegExp.js';
102
103
  export { isBoolean } from './predicate/isBoolean.js';
103
104
  export { isSymbol } from './predicate/isSymbol.js';
104
105
  export { isString } from './predicate/isString.js';
package/dist/index.js CHANGED
@@ -121,6 +121,7 @@ exports.isPlainObject = isTypedArray.isPlainObject;
121
121
  exports.isPrimitive = isTypedArray.isPrimitive;
122
122
  exports.isTypedArray = isTypedArray.isTypedArray;
123
123
  exports.isBoolean = predicate_index.isBoolean;
124
+ exports.isRegExp = predicate_index.isRegExp;
124
125
  exports.isString = predicate_index.isString;
125
126
  exports.isSymbol = predicate_index.isSymbol;
126
127
  exports.camelCase = string_index.camelCase;
package/dist/index.mjs CHANGED
@@ -99,6 +99,7 @@ export { isPlainObject } from './predicate/isPlainObject.mjs';
99
99
  export { isFunction } from './predicate/isFunction.mjs';
100
100
  export { isTypedArray } from './predicate/isTypedArray.mjs';
101
101
  export { isPrimitive } from './predicate/isPrimitive.mjs';
102
+ export { isRegExp } from './predicate/isRegExp.mjs';
102
103
  export { isBoolean } from './predicate/isBoolean.mjs';
103
104
  export { isSymbol } from './predicate/isSymbol.mjs';
104
105
  export { isString } from './predicate/isString.mjs';
@@ -8,6 +8,7 @@ export { isPlainObject } from './isPlainObject.mjs';
8
8
  export { isFunction } from './isFunction.mjs';
9
9
  export { isTypedArray } from './isTypedArray.mjs';
10
10
  export { isPrimitive } from './isPrimitive.mjs';
11
+ export { isRegExp } from './isRegExp.mjs';
11
12
  export { isBoolean } from './isBoolean.mjs';
12
13
  export { isSymbol } from './isSymbol.mjs';
13
14
  export { isString } from './isString.mjs';
@@ -8,6 +8,7 @@ export { isPlainObject } from './isPlainObject.js';
8
8
  export { isFunction } from './isFunction.js';
9
9
  export { isTypedArray } from './isTypedArray.js';
10
10
  export { isPrimitive } from './isPrimitive.js';
11
+ export { isRegExp } from './isRegExp.js';
11
12
  export { isBoolean } from './isBoolean.js';
12
13
  export { isSymbol } from './isSymbol.js';
13
14
  export { isString } from './isString.js';
@@ -5,6 +5,10 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
5
5
  const isFunction = require('../_chunk/isFunction-aCEz9d.js');
6
6
  const isTypedArray = require('../_chunk/isTypedArray-BBEkFl.js');
7
7
 
8
+ function isRegExp(value) {
9
+ return value instanceof RegExp;
10
+ }
11
+
8
12
  function isBoolean(x) {
9
13
  return typeof x === 'boolean';
10
14
  }
@@ -28,5 +32,6 @@ exports.isPlainObject = isTypedArray.isPlainObject;
28
32
  exports.isPrimitive = isTypedArray.isPrimitive;
29
33
  exports.isTypedArray = isTypedArray.isTypedArray;
30
34
  exports.isBoolean = isBoolean;
35
+ exports.isRegExp = isRegExp;
31
36
  exports.isString = isString;
32
37
  exports.isSymbol = isSymbol;
@@ -8,6 +8,7 @@ export { isPlainObject } from './isPlainObject.mjs';
8
8
  export { isFunction } from './isFunction.mjs';
9
9
  export { isTypedArray } from './isTypedArray.mjs';
10
10
  export { isPrimitive } from './isPrimitive.mjs';
11
+ export { isRegExp } from './isRegExp.mjs';
11
12
  export { isBoolean } from './isBoolean.mjs';
12
13
  export { isSymbol } from './isSymbol.mjs';
13
14
  export { isString } from './isString.mjs';
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Checks if `value` is a RegExp.
3
+ *
4
+ * @param {unknown} value The value to check.
5
+ * @returns {boolean} Returns `true` if `value` is a RegExp, `false` otherwise.
6
+ */
7
+ declare function isRegExp(value: unknown): value is RegExp;
8
+
9
+ export { isRegExp };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Checks if `value` is a RegExp.
3
+ *
4
+ * @param {unknown} value The value to check.
5
+ * @returns {boolean} Returns `true` if `value` is a RegExp, `false` otherwise.
6
+ */
7
+ declare function isRegExp(value: unknown): value is RegExp;
8
+
9
+ export { isRegExp };
@@ -0,0 +1,5 @@
1
+ function isRegExp(value) {
2
+ return value instanceof RegExp;
3
+ }
4
+
5
+ export { isRegExp };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "es-toolkit",
3
3
  "description": "A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.",
4
- "version": "1.16.0-dev.467+59d936f4",
4
+ "version": "1.16.0-dev.469+e4361253",
5
5
  "homepage": "https://es-toolkit.slash.page",
6
6
  "bugs": "https://github.com/toss/es-toolkit/issues",
7
7
  "repository": {