MCPcopy Create free account
hub / github.com/locustio/locust / queryStringToObject

Function queryStringToObject

locust/webui/src/utils/string.ts:49–50  ·  view source on GitHub ↗
(queryString: string)

Source from the content-addressed store, hash-verified

47 string.replace(/([a-z0-9])([A-Z0-9])/g, '$1 $2').replace(/^./, str => str.toUpperCase());
48
49export const queryStringToObject = (queryString: string) =>
50 Object.fromEntries(new URLSearchParams(queryString).entries());
51
52export const formatBytes = (bytes: number, decimals = 2) => {
53 if (bytes === 0) return '0 Bytes';

Callers 3

SwarmForm.test.tsxFile · 0.90
getUrlParamsFunction · 0.90
string.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…