0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-02-07 23:06:50 -05:00

Compare commits

...

3 commits

Author SHA1 Message Date
finleyjb
98b35f41b2
Merge ac881e318c into b962b87cfe 2025-01-19 09:43:35 -07:00
Finley Baker
ac881e318c Trigger build 2025-01-15 09:37:12 -07:00
Finley Baker
fa3ca121de Use SafeRexExp for separator module 2025-01-15 09:37:12 -07:00

View file

@ -1,9 +1,11 @@
// Copyright 2018-2025 the Deno authors. MIT license.
// TODO(petamoriken): enable prefer-primordials for node polyfills
// deno-lint-ignore-file prefer-primordials
import { primordials } from "ext:core/mod.js";
import { isWindows } from "ext:deno_node/_util/os.ts";
const { SafeRegExp } = primordials;
export const SEP = isWindows ? "\\" : "/";
export const SEP_PATTERN = isWindows ? /[\\/]+/ : /\/+/;
export const SEP_PATTERN = isWindows
? new SafeRegExp("[\\/]+")
: new SafeRegExp("\/+");