std/path/separator.ts
Lino Le Van 18d6a0ee30
deprecation(path): split off all constants into their own files and deprecate old names (#4153)
Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-01-18 14:54:39 +09:00

14 lines
561 B
TypeScript

// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.
import { isWindows } from "./_os.ts";
/**
* @deprecated (will be removed in 0.215.0) Use {@linkcode SEPARATOR} from {@link https://deno.land/std/path/constants.ts} instead.
*/
export const SEP: "/" | "\\" = isWindows ? "\\" : "/";
/**
* @deprecated (will be removed in 0.215.0) Use {@linkcode SEPARATOR_PATTERN} from {@link https://deno.land/std/path/constants.ts} instead.
*/
export const SEP_PATTERN: RegExp = isWindows ? /[\\/]+/ : /\/+/;