Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

kerezsiz42/qs

Utility function for encoding and decoding simple objects to and from search parameters of Url object. Only objects with a depth of one are supported, which correspond to the following type:

export type QueryParams = { [k: string]: string | string[] };

functions:

decodeQueryParams(urlSearch: string)

Returns an object of type QueryParams populated with the values read from urlSearch.

encodeQueryParams(queryParams: QueryParams)

Returns a urlSearch shaped string created from queryParams.

Usage:

You can simply import it from github:

import { decodeQueryParams, encodeQueryParams } from "https://raw.githubusercontent.com/kerezsiz42/qs/master/index.ts"

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages