No Description

wrap.js 326B

123456789101112
  1. define(['./partial'], function (partial) {
  2. // Returns the first function passed as an argument to the second,
  3. // allowing you to adjust arguments, run code before and after, and
  4. // conditionally execute the original function.
  5. function wrap(func, wrapper) {
  6. return partial(wrapper, func);
  7. }
  8. return wrap;
  9. });