Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var applyFn = cocb.wrap(function*(fn, ctx, args){
if(ktypes.isAction(fn)){
throw new Error("actions can only be called in the rule action block");
}
if( ! ktypes.isFunction(fn)){
throw new Error("Not a function");
}
return yield fn(ctx, args);
});
var applyFn = cocb.wrap(function*(fn, ctx, args){
if(ktypes.isAction(fn)){
throw new Error("actions can only be called in the rule action block");
}
if( ! ktypes.isFunction(fn)){
throw new Error("Not a function");
}
return yield fn(ctx, args);
});