Created
January 21, 2019 12:39
-
-
Save SebastianHGonzalez/38ff7468b6e65dfd8116731d6630958e to your computer and use it in GitHub Desktop.
point cut's around method
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
around(context, joinPoint, ...args) { | |
return this.aspects.reduce( | |
function aroundReducer(next, aspect) { | |
return function joinPointify(...newArgs) { | |
const newContext = this; | |
aspect.around(newContext, next, ...newArgs) | |
} | |
}, | |
joinPoint | |
).apply(context, args); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment