source: trip-planner-front/node_modules/slash/index.d.ts@ eed0bf8

Last change on this file since eed0bf8 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 621 bytes
RevLine 
[6a3a178]1/**
2Convert Windows backslash paths to slash paths: `foo\\bar` ➔ `foo/bar`.
3
4[Forward-slash paths can be used in Windows](http://superuser.com/a/176395/6877) as long as they're not extended-length paths and don't contain any non-ascii characters.
5
6@param path - A Windows backslash path.
7@returns A path with forward slashes.
8
9@example
10```
11import * as path from 'path';
12import slash = require('slash');
13
14const string = path.join('foo', 'bar');
15// Unix => foo/bar
16// Windows => foo\\bar
17
18slash(string);
19// Unix => foo/bar
20// Windows => foo/bar
21```
22*/
23declare function slash(path: string): string;
24
25export = slash;
Note: See TracBrowser for help on using the repository browser.