1.0.0 • Published 4 years ago
itheima-replace v1.0.0
安装方式
npm install itheima-replace
导入方式
const itheimaReplace = require('itheima-replace');
方法使用说明
替换字符串
- 参数1为原始字符串
- 参数2为需要替换的字符
代码示例
// 替换字符串,参数1为原始字符串,参数2为需要替换的字符
let result = itheimaReplace.replace('abcd', 'c');
console.log(result); // ab<span style="background-color:yellow">c</span>d
开源协议
ISC
1.0.0
4 years ago