diff options
Diffstat (limited to 'src/util.ts')
-rw-r--r-- | src/util.ts | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/src/util.ts b/src/util.ts index facc425..43bb2d8 100644 --- a/src/util.ts +++ b/src/util.ts @@ -6,16 +6,6 @@ export function undashUuid(uuid: string): string { return uuid.replace(/-/g, '').toLowerCase() } -export function queryToJson(queryString): { [ key: string ]: string } { - const query = {} - const pairs = (queryString[0] === '?' ? queryString.substr(1) : queryString).split('&') - for (let i = 0; i < pairs.length; i++) { - const pair = pairs[i].split('=') - query[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1] || '') - } - return query -} - export function jsonToQuery(data): string { return Object.entries(data || {}).map(e => e.join('=')).join('&') |