fix: use node fetch

This commit is contained in:
xHyroM
2022-07-11 09:59:12 +02:00
parent 8aad90088f
commit 6f1924d3c0
235 changed files with 59466 additions and 18798 deletions
+9
View File
@@ -0,0 +1,9 @@
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] === '?' ? '?' : '';
};