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.

123456789101112131415161718
  1. "use strict";
  2. const { atob } = require("abab");
  3. exports.stripLeadingAndTrailingASCIIWhitespace = string => {
  4. return string.replace(/^[ \t\n\f\r]+/u, "").replace(/[ \t\n\f\r]+$/u, "");
  5. };
  6. exports.isomorphicDecode = input => {
  7. return Array.from(input, byte => String.fromCodePoint(byte)).join("");
  8. };
  9. exports.forgivingBase64Decode = data => {
  10. const asString = atob(data);
  11. if (asString === null) {
  12. return null;
  13. }
  14. return Uint8Array.from(asString, c => c.codePointAt(0));
  15. };