(chore) run prettier
This commit is contained in:
@@ -2,11 +2,9 @@ import { TranslationCollection } from '../utils/translation.collection';
|
||||
import { PostProcessorInterface } from './post-processor.interface';
|
||||
|
||||
export class KeyAsDefaultValuePostProcessor implements PostProcessorInterface {
|
||||
|
||||
public name: string = 'KeyAsDefaultValue';
|
||||
|
||||
public process(draft: TranslationCollection, extracted: TranslationCollection, existing: TranslationCollection): TranslationCollection {
|
||||
return draft.map((key, val) => val === '' ? key : val);
|
||||
return draft.map((key, val) => (val === '' ? key : val));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2,11 +2,9 @@ import { TranslationCollection } from '../utils/translation.collection';
|
||||
import { PostProcessorInterface } from './post-processor.interface';
|
||||
|
||||
export class NullAsDefaultValuePostProcessor implements PostProcessorInterface {
|
||||
|
||||
public name: string = 'NullAsDefaultValue';
|
||||
|
||||
public process(draft: TranslationCollection, extracted: TranslationCollection, existing: TranslationCollection): TranslationCollection {
|
||||
return draft.map((key, val) => existing.get(key) === undefined ? null : val);
|
||||
return draft.map((key, val) => (existing.get(key) === undefined ? null : val));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
import { TranslationCollection } from '../utils/translation.collection';
|
||||
|
||||
export interface PostProcessorInterface {
|
||||
|
||||
name: string;
|
||||
|
||||
process(draft: TranslationCollection, extracted: TranslationCollection, existing: TranslationCollection): TranslationCollection;
|
||||
|
||||
}
|
||||
|
||||
@@ -2,11 +2,9 @@ import { TranslationCollection } from '../utils/translation.collection';
|
||||
import { PostProcessorInterface } from './post-processor.interface';
|
||||
|
||||
export class PurgeObsoleteKeysPostProcessor implements PostProcessorInterface {
|
||||
|
||||
public name: string = 'PurgeObsoleteKeys';
|
||||
|
||||
public process(draft: TranslationCollection, extracted: TranslationCollection, existing: TranslationCollection): TranslationCollection {
|
||||
return draft.intersect(extracted);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2,11 +2,9 @@ import { TranslationCollection } from '../utils/translation.collection';
|
||||
import { PostProcessorInterface } from './post-processor.interface';
|
||||
|
||||
export class SortByKeyPostProcessor implements PostProcessorInterface {
|
||||
|
||||
public name: string = 'SortByKey';
|
||||
|
||||
public process(draft: TranslationCollection, extracted: TranslationCollection, existing: TranslationCollection): TranslationCollection {
|
||||
return draft.sort();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user