UNPKG

@wix/design-system

Version:

@wix/design-system

15 lines 535 B
import { isString } from '../utils/StringUtils'; export const replaceSlash = (value) => { if (value === undefined || !isString(value) || value.length === 0) { return value; } if (value.includes('//')) { const [protocol, ...rest] = value.split('//'); const url = rest.join('//').replace(/\/$/, '').replaceAll('/', ' › '); return `${protocol}//${url}`; } else { return value.replace(/\/$/, '').replaceAll('/', ' › '); } }; //# sourceMappingURL=GooglePreviewUtils.js.map