Spaces:
Sleeping
Sleeping
File size: 296 Bytes
ef12564 |
1 2 3 4 5 6 7 8 9 10 |
export const getSearch = parsedURL => {
if (parsedURL.search) {
return parsedURL.search;
}
const lastOffset = parsedURL.href.length - 1;
const hash = parsedURL.hash || (parsedURL.href[lastOffset] === '#' ? '#' : '');
return parsedURL.href[lastOffset - hash.length] === '?' ? '?' : '';
};
|