Urara-Blog/node_modules/.pnpm-store/v3/files/5e/382ef0f8696057fb2e80d98ecc8fc9e54e2878d6281e41117cb837002d274c88e32388ff317768aead3c77322270ac3b39db50994cbaded6826d524275b226
2022-08-14 01:14:53 +08:00

25 lines
621 B
Text

/**
Convert Windows backslash paths to slash paths: `foo\\bar` ➔ `foo/bar`.
[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.
@param path - A Windows backslash path.
@returns A path with forward slashes.
@example
```
import * as path from 'path';
import slash = require('slash');
const string = path.join('foo', 'bar');
// Unix => foo/bar
// Windows => foo\\bar
slash(string);
// Unix => foo/bar
// Windows => foo/bar
```
*/
declare function slash(path: string): string;
export = slash;