No Description

after.js 266B

1234567891011121314
  1. define(function () {
  2. // Returns a function that will only be executed on and after the Nth call.
  3. function after(times, func) {
  4. return function() {
  5. if (--times < 1) {
  6. return func.apply(this, arguments);
  7. }
  8. };
  9. }
  10. return after;
  11. });