mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2025-05-20 13:14:44 +00:00
.
This commit is contained in:
parent
00c3b50fca
commit
ae5dcb46c8
7331 changed files with 1784502 additions and 0 deletions
19
node_modules/normalize-path/index.js
generated
vendored
Normal file
19
node_modules/normalize-path/index.js
generated
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
/*!
|
||||
* normalize-path <https://github.com/jonschlinkert/normalize-path>
|
||||
*
|
||||
* Copyright (c) 2014-2017, Jon Schlinkert.
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
var removeTrailingSeparator = require('remove-trailing-separator');
|
||||
|
||||
module.exports = function normalizePath(str, stripTrailing) {
|
||||
if (typeof str !== 'string') {
|
||||
throw new TypeError('expected a string');
|
||||
}
|
||||
str = str.replace(/[\\\/]+/g, '/');
|
||||
if (stripTrailing !== false) {
|
||||
str = removeTrailingSeparator(str);
|
||||
}
|
||||
return str;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue