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.

crlf.js 1.1KB

12345678910111213141516171819202122232425262728293031323334
  1. var __rest = (this && this.__rest) || function (s, e) {
  2. var t = {};
  3. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
  4. t[p] = s[p];
  5. if (s != null && typeof Object.getOwnPropertySymbols === "function")
  6. for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  7. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
  8. t[p[i]] = s[p[i]];
  9. }
  10. return t;
  11. };
  12. import { rewireSource } from '../util.js';
  13. const order = [
  14. 'end',
  15. 'description',
  16. 'postType',
  17. 'type',
  18. 'postName',
  19. 'name',
  20. 'postTag',
  21. 'tag',
  22. 'postDelimiter',
  23. 'delimiter',
  24. 'start',
  25. ];
  26. export default function crlf(ending) {
  27. function update(line) {
  28. return Object.assign(Object.assign({}, line), { tokens: Object.assign(Object.assign({}, line.tokens), { lineEnd: ending === 'LF' ? '' : '\r' }) });
  29. }
  30. return (_a) => {
  31. var { source } = _a, fields = __rest(_a, ["source"]);
  32. return rewireSource(Object.assign(Object.assign({}, fields), { source: source.map(update) }));
  33. };
  34. }