UNPKG

@alandawi/adhoc-utils

Version:

Some tools to improve the teamwork

7 lines (5 loc) 199 B
const escapeRegExp = require('./escapeRegExp'); const replaceAll = async (str, find, replace) => { await str.replace(new RegExp(escapeRegExp(find), 'g'), replace); } module.exports = replaceAll