mirror of
https://github.com/SomboChea/ui
synced 2024-09-30 05:17:47 +07:00
6 lines
189 B
JavaScript
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`);
|
||
|
}
|