docs: function buffered(fn) {
      var ms = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 200;
  
      var id = void 0;
      var bn = function bn() {
          var _this = this;
  
          for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
              args[_key] = arguments[_key];
          }
  
          return new Promise(function (resolve) {
              clearTimeout(id);
              id = setTimeout(function () {
                  return resolve(fn.apply(_this, args));
              }, ms);
          });
      };
      bn.cancel = function () {
          clearTimeout(id);
      };
      return bn;
  }