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.

addComments.js 448B

1234567891011121314151617181920212223
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = addComments;
  6. function addComments(node, type, comments) {
  7. if (!comments || !node) return node;
  8. const key = `${type}Comments`;
  9. if (node[key]) {
  10. if (type === "leading") {
  11. node[key] = comments.concat(node[key]);
  12. } else {
  13. node[key] = node[key].concat(comments);
  14. }
  15. } else {
  16. node[key] = comments;
  17. }
  18. return node;
  19. }