We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
replaceAll
1 parent b0ae1e6 commit fc785eeCopy full SHA for fc785ee
benchmarks/fdir-benchmark.ts
@@ -9,7 +9,7 @@ const syncSuites: ReturnType<(typeof b)["add"]>[] = [];
9
const asyncSuites: ReturnType<(typeof b)["add"]>[] = [];
10
11
function normalizeVersion(version: Version) {
12
- return version.replace(/\./g, "");
+ return version.replaceAll(".", "");
13
}
14
15
function makeSuite(version: Version) {
src/utils.ts
@@ -14,7 +14,7 @@ export function cleanPath(path: string) {
const SLASHES_REGEX = /[\\/]/g;
16
export function convertSlashes(path: string, separator: PathSeparator) {
17
- return path.replace(SLASHES_REGEX, separator);
+ return path.replaceAll(SLASHES_REGEX, separator);
18
19
20
const WINDOWS_ROOT_DIR_REGEX = /^[a-z]:[\\/]$/i;
0 commit comments