1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-20 20:42:19 -05:00
This commit is contained in:
finleyjb 2025-01-20 23:27:15 +01:00 committed by GitHub
commit f8c8c1513c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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("\/+");