summaryrefslogtreecommitdiff
path: root/std/path/separator.ts
diff options
context:
space:
mode:
Diffstat (limited to 'std/path/separator.ts')
-rw-r--r--std/path/separator.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/std/path/separator.ts b/std/path/separator.ts
new file mode 100644
index 000000000..fb990b808
--- /dev/null
+++ b/std/path/separator.ts
@@ -0,0 +1,4 @@
+// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
+const isWindows = Deno.build.os == "windows";
+export const SEP = isWindows ? "\\" : "/";
+export const SEP_PATTERN = isWindows ? /[\\/]+/ : /\/+/;