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.

es.string.from-code-point.js 1.1KB

1234567891011121314151617181920212223242526272829
  1. var $ = require('../internals/export');
  2. var toAbsoluteIndex = require('../internals/to-absolute-index');
  3. var fromCharCode = String.fromCharCode;
  4. // eslint-disable-next-line es/no-string-fromcodepoint -- required for testing
  5. var $fromCodePoint = String.fromCodePoint;
  6. // length should be 1, old FF problem
  7. var INCORRECT_LENGTH = !!$fromCodePoint && $fromCodePoint.length != 1;
  8. // `String.fromCodePoint` method
  9. // https://tc39.es/ecma262/#sec-string.fromcodepoint
  10. $({ target: 'String', stat: true, forced: INCORRECT_LENGTH }, {
  11. // eslint-disable-next-line no-unused-vars -- required for `.length`
  12. fromCodePoint: function fromCodePoint(x) {
  13. var elements = [];
  14. var length = arguments.length;
  15. var i = 0;
  16. var code;
  17. while (length > i) {
  18. code = +arguments[i++];
  19. if (toAbsoluteIndex(code, 0x10FFFF) !== code) throw RangeError(code + ' is not a valid code point');
  20. elements.push(code < 0x10000
  21. ? fromCharCode(code)
  22. : fromCharCode(((code -= 0x10000) >> 10) + 0xD800, code % 0x400 + 0xDC00)
  23. );
  24. } return elements.join('');
  25. }
  26. });