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.

onlyOnce.js 363B

123456789101112131415
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = onlyOnce;
  6. function onlyOnce(fn) {
  7. return function (...args) {
  8. if (fn === null) throw new Error("Callback was already called.");
  9. var callFn = fn;
  10. fn = null;
  11. callFn.apply(this, args);
  12. };
  13. }
  14. module.exports = exports["default"];