Skip to content

Parse

parse

sep?: string EN: Parse a delimited key=value string (like a query string) into an object, with optional camelCase conversion.

/**
*
* @param { string } str 字符串
* @param { ParseOptions } options {
sep?: string
eq?: string
camel?: boolean
}
* @param { string } options.seq 默认 &
* @param { string } options.eq 默认 =
* @param { string } options.camel 默认 false
* @returns
* @description EN: Parse a delimited key=value string (like a query string) into an object, with optional camelCase conversion.
*/

parseCss

解析css转换为对象 EN: Parse a block of CSS and return a mapping from selector to declaration string.

/**
* 解析css转换为对象
* @param { string } str
* @returns
* @description EN: Parse a block of CSS and return a mapping from selector to declaration string.
*/

hasProtocol

解析URL EN: Parse a URL string into its components (protocol, host, pathname, search, hash), with optional default protocol.

/**
* 解析URL
* @param { string } input 链接
* @param defaultProto
* @returns
* @description EN: Parse a URL string into its components (protocol, host, pathname, search, hash), with optional default protocol.
*/

parseURL

解析URL EN: Parse a URL string into its components (protocol, host, pathname, search, hash), with optional default protocol.

/**
* 解析URL
* @param { string } input 链接
* @param defaultProto
* @returns
* @description EN: Parse a URL string into its components (protocol, host, pathname, search, hash), with optional default protocol.
*/

parsePath

解析URL EN: Parse a URL string into its components (protocol, host, pathname, search, hash), with optional default protocol.

/**
* 解析URL
* @param { string } input 链接
* @param defaultProto
* @returns
* @description EN: Parse a URL string into its components (protocol, host, pathname, search, hash), with optional default protocol.
*/