@godxiaoji/url-handler
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

URLHandler

URL 处理插件。

Install

CDN

<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@godxiaoji/url-handler@1.1.1/dist/url-handler.js"></script>

NPM

npm i @godxiaoji/url-handler -S

在 module 中引入

import URLHandler from '@godxiaoji/url-handler'

const myUrl = new URLHandler('https://test.com/path?a=1&b=2#hash')

Methods

URLHandler.prototype.addQuery(name: string | {[propName: string]: string}, value?: any)

URLHandler.prototype.removeQuery(name: string | string[])

URLHandler.prototype.setHash(hash: string)

Author

Travis

Readme

Keywords

Package Sidebar

Install

npm i @godxiaoji/url-handler

Weekly Downloads

12

Version

1.2.0

License

MIT

Unpacked Size

16.8 kB

Total Files

8

Last publish

Collaborators

  • godxiaoji