react-native-navigation
Version:
React Native Navigation - truly native navigation for iOS and Android
19 lines (18 loc) • 713 B
JavaScript
;
export class OptionProcessorsStore {
optionsProcessorsByObjectPath = {};
addProcessor(optionPath, processor) {
if (!this.optionsProcessorsByObjectPath[optionPath]) this.optionsProcessorsByObjectPath[optionPath] = [];
this.optionsProcessorsByObjectPath[optionPath].push(processor);
return {
remove: () => this.removeProcessor(optionPath, processor)
};
}
getProcessors(optionPath) {
return this.optionsProcessorsByObjectPath[optionPath];
}
removeProcessor(optionPath, processor) {
this.optionsProcessorsByObjectPath[optionPath].splice(this.optionsProcessorsByObjectPath[optionPath].indexOf(processor));
}
}
//# sourceMappingURL=OptionProcessorsStore.js.map