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.

decode_codepoint.js 691B

12345678910111213141516171819202122232425
  1. var decodeMap = require("../maps/decode.json");
  2. module.exports = decodeCodePoint;
  3. // modified version of https://github.com/mathiasbynens/he/blob/master/src/he.js#L94-L119
  4. function decodeCodePoint(codePoint) {
  5. if ((codePoint >= 0xd800 && codePoint <= 0xdfff) || codePoint > 0x10ffff) {
  6. return "\uFFFD";
  7. }
  8. if (codePoint in decodeMap) {
  9. codePoint = decodeMap[codePoint];
  10. }
  11. var output = "";
  12. if (codePoint > 0xffff) {
  13. codePoint -= 0x10000;
  14. output += String.fromCharCode(((codePoint >>> 10) & 0x3ff) | 0xd800);
  15. codePoint = 0xdc00 | (codePoint & 0x3ff);
  16. }
  17. output += String.fromCharCode(codePoint);
  18. return output;
  19. }