Files
vanillajs-seed/node_modules/i18next/dist/es/postProcessor.js
2019-04-12 20:01:07 +02:00

14 lines
430 B
JavaScript

export default {
processors: {},
addPostProcessor: function addPostProcessor(module) {
this.processors[module.name] = module;
},
handle: function handle(processors, value, key, options, translator) {
var _this = this;
processors.forEach(function (processor) {
if (_this.processors[processor]) value = _this.processors[processor].process(value, key, options, translator);
});
return value;
}
};