flow like the river
This commit is contained in:
commit
013fe673f3
42435 changed files with 5764238 additions and 0 deletions
9
BACK_BACK/node_modules/node-fetch/src/utils/get-search.js
generated
vendored
Executable file
9
BACK_BACK/node_modules/node-fetch/src/utils/get-search.js
generated
vendored
Executable 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] === '?' ? '?' : '';
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue