-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
6 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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("\/+"); |