Sample Gunner Strategy implementation
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
295 B

const Gunner = require('@klenty/gunner');
const processUnit = require('./processUnit');
module.exports = instance => when => hook => {
const GunnerConstant = when === 'before'
? Gunner.Start
: Gunner.End;
return instance[when](GunnerConstant, state =>
processUnit(hook, state));
};