UNPKG

@vendure/ngx-translate-extract

Version:

Extract strings from projects using ngx-translate

11 lines (10 loc) 367 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); } }