Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

qsman

0.0.2 • Public • Published

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 上

例如

Keywords

none

install

npm i qsman

Downloadsweekly downloads

6

version

0.0.2

license

MIT

last publish

collaborators

  • avatar
Report a vulnerability