# getUrlParams([url]) ⇒ Object

获取url参数,解析为一个对象

Returns: Object -

解析url的参数,结果为对象


Author: liukun 919590347@qq.com

Param Type Default Description
[url] string "window.location.href"

合法的url

Example

import { getUrlParams } from '@wont/utils'
getUrlParams('https://wont-org.github.io?a=1&b=2')  // returns {a:'1',b:'2'}