中文
Appearance
对字符串 str 中的正则元字符进行转义,返回转义后的字符串。
str
Added in v0.0.2
import { escapeRegExp } from 'parsnip-kit' escapeRegExp('hello world') // 'hello world' escapeRegExp('${name}') // '\\$\\{name\\}'
string
false
undefined