mirror of
https://github.com/SomboChea/ui
synced 2024-06-27 21:45:33 +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`);
|
|
}
|