replace-text
code:script.js
export const replaceText = (text) => {
const search = window.prompt('search')
if (search == null || search === '') return
const replace = window.prompt('replace')
if (replace == null) return
return text.replaceAll(search, replace)
}