summaryrefslogtreecommitdiff
path: root/std/path/mod.ts
diff options
context:
space:
mode:
authorNayeem Rahman <muhammed.9939@gmail.com>2019-10-16 19:39:33 +0100
committerRyan Dahl <ry@tinyclouds.org>2019-10-16 14:39:33 -0400
commitf51dcc12d7a75a677529d63eb53d7a577d5b9289 (patch)
tree67c5ee1026a6da84e68b249a77067bfd0b313532 /std/path/mod.ts
parent99d8ac70dbf412ee5de9ad2370c75dcd51cc5def (diff)
std: Move fs/path to the top-level (#3100)
Diffstat (limited to 'std/path/mod.ts')
-rw-r--r--std/path/mod.ts30
1 files changed, 30 insertions, 0 deletions
diff --git a/std/path/mod.ts b/std/path/mod.ts
new file mode 100644
index 000000000..dd79441f5
--- /dev/null
+++ b/std/path/mod.ts
@@ -0,0 +1,30 @@
+// Copyright the Browserify authors. MIT License.
+// Ported from https://github.com/browserify/path-browserify/
+
+import * as _win32 from "./win32.ts";
+import * as _posix from "./posix.ts";
+
+import { isWindows } from "./constants.ts";
+
+const path = isWindows ? _win32 : _posix;
+
+export const win32 = _win32;
+export const posix = _posix;
+export const resolve = path.resolve;
+export const normalize = path.normalize;
+export const isAbsolute = path.isAbsolute;
+export const join = path.join;
+export const relative = path.relative;
+export const toNamespacedPath = path.toNamespacedPath;
+export const dirname = path.dirname;
+export const basename = path.basename;
+export const extname = path.extname;
+export const format = path.format;
+export const parse = path.parse;
+export const sep = path.sep;
+export const delimiter = path.delimiter;
+
+export { EOL, SEP, SEP_PATTERN, isWindows } from "./constants.ts";
+export * from "./interface.ts";
+export * from "./glob.ts";
+export * from "./globrex.ts";