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.

stringify.js 545B

1234567891011121314151617181920
  1. "use strict";
  2. function stringify (document) {
  3. let stringify;
  4. if (document instanceof require("./document")) {
  5. stringify = docStringify;
  6. } else {
  7. stringify = document.source.syntax.stringify;
  8. }
  9. return stringify.apply(this, arguments);
  10. }
  11. function docStringify (document, builder) {
  12. document.nodes.forEach((root, i) => {
  13. builder(root.raws.beforeStart, root, "beforeStart");
  14. root.source.syntax && root.source.syntax.stringify(root, builder);
  15. });
  16. builder(document.raws.afterEnd, document, "afterEnd");
  17. }
  18. module.exports = stringify;