Skip to content

Instantly share code, notes, and snippets.

@SebastianHGonzalez
Last active January 21, 2019 12:35
Show Gist options
  • Select an option

  • Save SebastianHGonzalez/7ed1b2c0c4a548f75d72e4d59f9aae3e to your computer and use it in GitHub Desktop.

Select an option

Save SebastianHGonzalez/7ed1b2c0c4a548f75d72e4d59f9aae3e to your computer and use it in GitHub Desktop.
point cut's before and after methods
before(context, joinPointName, ...args) {
this.aspects.reduce(
(_, aspect) => aspect.before(context, joinPointName, ...args)
);
}
after(context, joinPointName, result, ...args) {
return this.aspects.reduce(
(prevResult, aspect) => aspect.after(context, joinPointName, prevResult, ...args),
result
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment