UNPKG

@rr0/cms

Version:

RR0 Content Management System (CMS)

18 lines (17 loc) 461 B
import { IndexedReplacer } from "./IndexedReplacer.js"; export class IndexedReplacerFactory { constructor() { this.singleton = new IndexedReplacer(); } async create(context) { const instance = await this.getInstance(); return { replace: (original) => { return instance.replacement(context, original); } }; } async getInstance() { return this.singleton; } }