UNPKG

rambda

Version:

Lightweight and faster alternative to Ramda with included TS definitions

11 lines (9 loc) 211 B
export function replaceAll(patterns, replacer) { return input => { let text = input patterns.forEach(singlePattern => { text = text.replace(singlePattern, replacer) }) return text } }