ts-aspect
Version:
Simplistic library for Aspect Oriented Programming in TypeScript
13 lines (12 loc) • 531 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.addAspectToPointcut = void 0;
const addAspect_1 = require("./addAspect");
const getPointcutMethods_1 = require("./getPointcutMethods");
function addAspectToPointcut(target, pointcut, advice, aspect) {
const methods = (0, getPointcutMethods_1.getPointcutMethods)(target, pointcut);
methods.forEach(method => {
(0, addAspect_1.addAspect)(target, method, advice, aspect);
});
}
exports.addAspectToPointcut = addAspectToPointcut;