MCPcopy Create free account
hub / github.com/sindresorhus/query-string / decodeQueryKey

Function decodeQueryKey

base.js:407–409  ·  view source on GitHub ↗
(key)

Source from the content-addressed store, hash-verified

405
406// The key as `parse()` would decode it, so two spellings of the same key, like `a+b` and `a%20b`, can be compared.
407function decodeQueryKey(key) {
408 return decodeComponent(key.replaceAll('+', ' '));
409}
410
411// An option that is explicitly `undefined` uses its default, like an omitted option. That is what a caller passes through with an optional setting, like `{decode: config.decode}`. Spreading it over the defaults would instead override the default with `undefined`, so `{encode: undefined}` would write the values unencoded.
412function definedOptions(options) {

Callers 1

stringifyUrlFunction · 0.85

Calls 1

decodeComponentFunction · 0.85

Tested by

no test coverage detected