mutate-qs
mutate queryString in browser location
Last updated 5 years ago by kchan .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install mutate-qs 
SYNC missed versions from official npm registry.

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

Current Tags

  • 0.0.4                                ...           latest (5 years ago)

4 Versions

  • 0.0.4                                ...           5 years ago
  • 0.0.3                                ...           5 years ago
  • 0.0.2                                ...           5 years ago
  • 0.0.1                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (7)
Dependents (2)

Copyright 2014 - 2017 © taobao.org |