Skip to content
解析和维护(增删改查) URL 上的参数
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dist
src
test
.esdoc.json
.gitignore
.travis.yml
CHANGELOG.md
LICENSE
README.md
babel.config.js
package-lock.json
package.json
rollup.config.js

README.md

qsman: query string maintainer

NPM version Build Status Coverage Status Known Vulnerabilities changelog license

npm-image

解析和维护(增删改查) URL 上的参数, 拼接 URL 参数的时候再也不用判断是追加 ? 还是 &

Example

import QsMan from 'qsman';

var url = new QsMan('https://domain.com?foo=bar').append({
    a: 1,
    b: 2,
    c: '中文'
}).toString();

// https://domain.com?foo=bar&a=1&b=2&c=%E4%B8%AD%E6%96%87
console.log(url);

APIDoc

ESDoc

为什么造轮子

找了很多库都只能一次性解析 query string, 不能方便地维护 query string, 也不能方便地将 query string 再追加到 URL 上

例如

You can’t perform that action at this time.