Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

WarnSettings.js 875B

12345678910111213141516171819202122232425262728293031323334353637
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = void 0;
  6. const WarnSettings = function () {
  7. /** @type {WeakMap<object, Set<string>>} */
  8. const warnedSettings = new WeakMap();
  9. return {
  10. /**
  11. * Warn only once for each context and setting
  12. *
  13. * @param {object} context
  14. * @param {string} setting
  15. */
  16. hasBeenWarned(context, setting) {
  17. return warnedSettings.has(context) && warnedSettings.get(context).has(setting);
  18. },
  19. markSettingAsWarned(context, setting) {
  20. // istanbul ignore else
  21. if (!warnedSettings.has(context)) {
  22. warnedSettings.set(context, new Set());
  23. }
  24. warnedSettings.get(context).add(setting);
  25. }
  26. };
  27. };
  28. var _default = WarnSettings;
  29. exports.default = _default;
  30. module.exports = exports.default;
  31. //# sourceMappingURL=WarnSettings.js.map