0.0.4 • Published 8 years ago

mutate-qs v0.0.4

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

mutate-qs Build Status

mutate queryString in browser location

Install

$ npm install --save mutate-qs

Usage

const mutateQs = require('mutate-qs');

// assuming location.search is `?bar=haha`
mutateQs({foo: 'lily'})
//=> '?bar=haha&foo=lily'

// to remove a param
mutateQs({bar: null})
//=> '?bar='

API

mutateQs(obj, query)

obj

Type: object

set the queryString by key/value in obj

query

Type: string Default: location.search

The queryString, default is location.seach, anything starts with ? is valid queryString.

License

MIT © EGOIST

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago