To highlight some key content with color
demo
- demo1
- demo2
usage
// installyarn add keylight // import // useconst kl = '#f701bc'const content = "hello world"const key = "hello"const hightContent = kl// => '<span style="color:#f701bc;">hello</span> world' // change colorklcolor = '#ababab'const hightContent = kl// => '<span style="color:#ababab;">hello</span> world' // additional operatingconst upperCase = valconst hightContent = kl // => '<span style="color:#ababab;">HELLO</span> world'