mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-16 21:56:25 -05:00
refactor: 🔨 change arguments to rest parameter
This commit is contained in:
parent
48459b50ac
commit
136de84cc5
1 changed files with 2 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
/* eslint prefer-rest-params:off */
|
||||
|
||||
module.exports.spliceURL = function spliceURL() {
|
||||
return Array.from(arguments).reduce((lastResult, current) => lastResult + current).replace(/([^:])(\/)+(.)/g, `$1/$3`);
|
||||
export const spliceURL = function spliceURL(...args) {
|
||||
return Array.from(args).reduce((lastResult, current) => lastResult + current).replace(/([^:])(\/)+(.)/g, `$1/$3`);
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue