UNPKG

@vendure/ngx-translate-extract

Version:
11 lines (10 loc) 371 B
export class StringAsDefaultValuePostProcessor { options; name = 'StringAsDefaultValue'; constructor(options) { this.options = options; } process(draft, extracted, existing) { return draft.map((key, val) => (existing.get(key) === undefined ? { value: this.options.defaultValue, sourceFiles: (val?.sourceFiles || []) } : val)); } }