summaryrefslogtreecommitdiff
path: root/ext/node/polyfills/path/separator.ts
diff options
context:
space:
mode:
Diffstat (limited to 'ext/node/polyfills/path/separator.ts')
-rw-r--r--ext/node/polyfills/path/separator.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/node/polyfills/path/separator.ts b/ext/node/polyfills/path/separator.ts
new file mode 100644
index 000000000..2cfde31d0
--- /dev/null
+++ b/ext/node/polyfills/path/separator.ts
@@ -0,0 +1,6 @@
+// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
+
+import { isWindows } from "internal:deno_node/polyfills/_util/os.ts";
+
+export const SEP = isWindows ? "\\" : "/";
+export const SEP_PATTERN = isWindows ? /[\\/]+/ : /\/+/;