Skip to content

Commit fc785ee

Browse files
committed
chore: use replaceAll where applicable
1 parent b0ae1e6 commit fc785ee

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

benchmarks/fdir-benchmark.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const syncSuites: ReturnType<(typeof b)["add"]>[] = [];
99
const asyncSuites: ReturnType<(typeof b)["add"]>[] = [];
1010

1111
function normalizeVersion(version: Version) {
12-
return version.replace(/\./g, "");
12+
return version.replaceAll(".", "");
1313
}
1414

1515
function makeSuite(version: Version) {

src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export function cleanPath(path: string) {
1414

1515
const SLASHES_REGEX = /[\\/]/g;
1616
export function convertSlashes(path: string, separator: PathSeparator) {
17-
return path.replace(SLASHES_REGEX, separator);
17+
return path.replaceAll(SLASHES_REGEX, separator);
1818
}
1919

2020
const WINDOWS_ROOT_DIR_REGEX = /^[a-z]:[\\/]$/i;

0 commit comments

Comments
 (0)