@muban/storybook
Version:
Storybook for Muban: View and Test Muban components.
8 lines (7 loc) • 488 B
JavaScript
/* eslint-disable no-restricted-properties,@typescript-eslint/no-explicit-any,unicorn/prevent-abbreviations,@typescript-eslint/naming-convention */
export function getUrl(basePath, storyPath, params) {
var _a;
const fetchUrl = new URL(`${basePath}/${storyPath}`, 'http://fallback');
fetchUrl.search = (_a = params === null || params === void 0 ? void 0 : params.toString()) !== null && _a !== void 0 ? _a : '';
return fetchUrl.toString().replace('http://fallback', '');
}