import _ from 'lodash' import {baseConfigProcess} from "./config"; import {lookupFn, lookupScope} from "./lib"; class FixClass { @baseConfigProcess() fix(me, config) { const {fix} = config if (!fix) { return } const scope = lookupScope(me) if (_.isArray(fix)) { _.each(fix, (f) => { const fn = lookupFn(scope, f) fn.call(this, me, config) }) } else if (_.isString(fix)) { const fn = lookupFn(scope, fix) fn.call(this, me, config) } } }