Replace Something in a String with async callback
import { string } from "@rjweb/utils"import db from "somewhere"string.replaceAsync('very long string or something', /./g, async(match) => { const result = await db.get(match) return result}) Copy
import { string } from "@rjweb/utils"import db from "somewhere"string.replaceAsync('very long string or something', /./g, async(match) => { const result = await db.get(match) return result})
1.8.3
nodejs, browser
Replace Something in a String with async callback