refactor(plugins): update search plugin

This commit is contained in:
qingwei.li 2017-02-19 10:47:47 +08:00 • committed by cinwell.li
commit 079bd00395
22 changed files with 348 additions and 393 deletions

View file

@ -25,7 +25,7 @@ export function stringifyQuery (obj) {
const qs = []
for (const key in obj) {
qs.push(`${encode(key)}=${encode(obj[key])}`)
qs.push(`${encode(key)}=${encode(obj[key])}`.toLowerCase())
}
return qs.length ? `?${qs.join('&')}` : ''
@ -41,8 +41,8 @@ export function getPath (...args) {
return cleanPath(args.join('/'))
}
export const isResolvePath = cached(path => {
return /:|(\/{2})/.test(path)
export const isAbsolutePath = cached(path => {
return /(:|(\/{2}))/.test(path)
})
export const getRoot = cached(path => {