0.1.0 • Published 6 years ago

@jamen/query-string v0.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

@jamen/query-string

Small query-string encode and decode.

Fork of @whaaaley/query-string to support Node.js and URI-encoded values.

Install

npm i @jamen/query-string

Usage

Your module system needs to support es2015 modules to use this package.

decode(str) -> obj

decode('?foo=bar&baz=qux&quux=corge')
// => { foo: 'bar', baz: 'qux', quux: 'corge' }

encode(obj) -> str

encode({ foo: 'bar', baz: 'qux', quux: 'corge' })
// => '?foo=bar&baz=qux&quux=corge'