nicecode-v2/packages/func/src/string/index.md

514 B

title toc
字符串相关 content

代码演示

getValueByUrl

通过 url 返回想要的参数

import { getValueByUrl } from '@zhst/func'

const value = getValueByUrl('a', 'http://localhost:30058?a=123&token=asdfasdfsdf')
//  --> 123
const value2 = getValueByUrl('a', '?a=123&token=asdfasdfsdf')
//  --> 123
const value3 = getValueByUrl('a', 'a=123&token=asdfasdfsdf')
//  --> 123

调试台 px 转 rem