es-toolkit 1.26.1-dev.844 → 1.26.1-dev.845

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.
@@ -2206,6 +2206,9 @@ function repeat(str, n) {
2206
2206
  }
2207
2207
 
2208
2208
  function replace(target = '', pattern, replacement) {
2209
+ if (arguments.length < 3) {
2210
+ return toString(target);
2211
+ }
2209
2212
  return toString(target).replace(pattern, replacement);
2210
2213
  }
2211
2214
 
@@ -1,6 +1,9 @@
1
1
  import { toString } from '../util/toString.mjs';
2
2
 
3
3
  function replace(target = '', pattern, replacement) {
4
+ if (arguments.length < 3) {
5
+ return toString(target);
6
+ }
4
7
  return toString(target).replace(pattern, replacement);
5
8
  }
6
9
 
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.26.1-dev.844+f09d5a3c",
4
+ "version": "1.26.1-dev.845+b6ec80d2",
5
5
  "homepage": "https://es-toolkit.slash.page",
6
6
  "bugs": "https://github.com/toss/es-toolkit/issues",
7
7
  "repository": {