0.14.0 • Published 2 years ago

@totebox/query v0.14.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@totebox/query

安装

npm i @totebox/query

使用

import Query from '../src/index';

const query = Query(url);
query.add({ country: 'china' }).href(); // ...?country=china&...

API

Query(url) => query

url 不传默认为 location.href

query.values() => querys object

query.add(values = {}) => query

query.remove(querys) => query

querys: String | Array,url 中要移除的 query 的 key

query.has(querys) => Boolean

querys: String | Array,url 中要匹配的 query 的 key,如果是数组,必须全部匹配

query.href() => url

License

MIT © nicolaszhao

0.14.0

2 years ago

0.13.0

4 years ago

0.12.6

4 years ago

0.12.5

4 years ago

0.12.4

4 years ago

0.12.3

5 years ago

0.12.2

5 years ago

0.12.1

5 years ago