code: function wrapper() {
          context = this;
          args = arguments;
          if (!no_postpone) {
            cancel();
            timeout = $timeout(ping, wait);
          } else if (executed) {
            executed = false;
            timeout = $timeout(ping, wait);
          }
        }
docs: This is the actual result of the debounce call. It is a wrapper function which you can invoke multiple times and which will only be called once every "wait" milliseconds.