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.

transform.js 1.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.transformAsync = exports.transformSync = exports.transform = void 0;
  6. function _gensync() {
  7. const data = require("gensync");
  8. _gensync = function () {
  9. return data;
  10. };
  11. return data;
  12. }
  13. var _config = require("./config");
  14. var _transformation = require("./transformation");
  15. const transformRunner = _gensync()(function* transform(code, opts) {
  16. const config = yield* (0, _config.default)(opts);
  17. if (config === null) return null;
  18. return yield* (0, _transformation.run)(config, code);
  19. });
  20. const transform = function transform(code, opts, callback) {
  21. if (typeof opts === "function") {
  22. callback = opts;
  23. opts = undefined;
  24. }
  25. if (callback === undefined) return transformRunner.sync(code, opts);
  26. transformRunner.errback(code, opts, callback);
  27. };
  28. exports.transform = transform;
  29. const transformSync = transformRunner.sync;
  30. exports.transformSync = transformSync;
  31. const transformAsync = transformRunner.async;
  32. exports.transformAsync = transformAsync;