mirror of
https://github.com/denoland/std.git
synced 2024-11-21 20:50:22 +00:00
388800f301
Co-authored-by: Nathan Whitaker <nathan@deno.com> Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
19 lines
705 B
TypeScript
19 lines
705 B
TypeScript
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
// This module is browser compatible.
|
|
import { isWindows } from "./_os.ts";
|
|
|
|
/**
|
|
* The character used to separate entries in the PATH environment variable.
|
|
* On Windows, this is `;`. On all other platforms, this is `:`.
|
|
*/
|
|
export const DELIMITER = isWindows ? ";" as const : ":" as const;
|
|
/**
|
|
* The character used to separate components of a file path.
|
|
* On Windows, this is `\`. On all other platforms, this is `/`.
|
|
*/
|
|
export const SEPARATOR = isWindows ? "\\" as const : "/" as const;
|
|
/**
|
|
* A regular expression that matches one or more path separators.
|
|
*/
|
|
export const SEPARATOR_PATTERN = isWindows ? /[\\/]+/ : /\/+/;
|