Front end of the Slack clone application.

12345678910111213141516171819202122232425262728293031
  1. "use strict";
  2. var FastMap = (function () {
  3. function FastMap() {
  4. this.values = {};
  5. }
  6. FastMap.prototype.delete = function (key) {
  7. this.values[key] = null;
  8. return true;
  9. };
  10. FastMap.prototype.set = function (key, value) {
  11. this.values[key] = value;
  12. return this;
  13. };
  14. FastMap.prototype.get = function (key) {
  15. return this.values[key];
  16. };
  17. FastMap.prototype.forEach = function (cb, thisArg) {
  18. var values = this.values;
  19. for (var key in values) {
  20. if (values.hasOwnProperty(key) && values[key] !== null) {
  21. cb.call(thisArg, values[key], key);
  22. }
  23. }
  24. };
  25. FastMap.prototype.clear = function () {
  26. this.values = {};
  27. };
  28. return FastMap;
  29. }());
  30. exports.FastMap = FastMap;
  31. //# sourceMappingURL=FastMap.js.map