UNPKG

@rr0/cms

Version:

RR0 Content Management System (CMS)

17 lines (16 loc) 387 B
/** * Creates replacers for notes HTML in a given context. */ export class NoteReplacerFactory { constructor(replacer) { this.replacer = replacer; } async create(context) { const instance = this.replacer; return { async replace(original) { return instance.replacement(context, original); } }; } }