mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2025-05-21 05:24:45 +00:00
.
This commit is contained in:
parent
beb1329f9f
commit
2b95e76931
7736 changed files with 1874747 additions and 51184 deletions
44
node_modules/slash/readme.md
generated
vendored
Normal file
44
node_modules/slash/readme.md
generated
vendored
Normal file
|
@ -0,0 +1,44 @@
|
|||
# slash [](https://travis-ci.org/sindresorhus/slash)
|
||||
|
||||
> 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.
|
||||
|
||||
This was created since the `path` methods in Node.js outputs `\\` paths on Windows.
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install slash
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const path = require('path');
|
||||
const slash = require('slash');
|
||||
|
||||
const string = path.join('foo', 'bar');
|
||||
// Unix => foo/bar
|
||||
// Windows => foo\\bar
|
||||
|
||||
slash(string);
|
||||
// Unix => foo/bar
|
||||
// Windows => foo/bar
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### slash(path)
|
||||
|
||||
Type: `string`
|
||||
|
||||
Accepts a Windows backslash path and returns a path with forward slashes.
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
Loading…
Add table
Add a link
Reference in a new issue