1
0
Fork 1
mirror of https://github.com/SomboChea/ui synced 2024-05-20 10:21:36 +07:00
verdaccio-ui/src/utils/string.js
2019-04-04 21:23:40 +02:00

6 lines
189 B
JavaScript

// @flow
export function spliceURL(...args: Array<string>): string {
return Array.from(args).reduce((lastResult, current) => lastResult + current).replace(/([^:])(\/)+(.)/g, `$1/$3`);
}