Skip to content

Commit 6eaf9ff

Browse files
committed
Merge branch 'master' of github.com:HowProgrammingWorks/Wrapper
2 parents df493a4 + f3b843d commit 6eaf9ff

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

JavaScript/3-callback.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
// const wrapAsync = (before, after, beforeCb, afterCb, f) =>
66
// (...args) => {
7-
// const callback = arrs[arrs.length -1];
7+
// const callback = args[args.length - 1];
88
// if (typeof callback === 'function') {
99
// args[args.length - 1] = (...pars) =>
1010
// afterCb(callback(...beforeCb(...pars)));

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# Wrapper
2-
Wrapper functions, Interface wrappers, etc.
1+
# Wrapper functions, Interface wrappers, etc.
2+
3+
[![Примеси, обертки, декораторы, мемоизация ](https://img.youtube.com/vi/oRQ0kQr1N-U/0.jpg)](https://www.youtube.com/watch?v=oRQ0kQr1N-U)
34

45
Task: rewrite wrapper function to have custom callbacks: `beforeCall, afterCall, beforeCallback, afterCallback` passed as parameters. Or implement wrapper using prototypes and/or classes.

0 commit comments

Comments
 (0)