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.

safe-from-int.js 689B

1234567891011121314151617181920212223242526
  1. 'use strict'
  2. var fromCharCode = require('../constant/from-char-code.js')
  3. function safeFromInt(value, base) {
  4. var code = parseInt(value, base)
  5. if (
  6. // C0 except for HT, LF, FF, CR, space
  7. code < 9 ||
  8. code === 11 ||
  9. (code > 13 && code < 32) || // Control character (DEL) of the basic block and C1 controls.
  10. (code > 126 && code < 160) || // Lone high surrogates and low surrogates.
  11. (code > 55295 && code < 57344) || // Noncharacters.
  12. (code > 64975 && code < 65008) ||
  13. (code & 65535) === 65535 ||
  14. (code & 65535) === 65534 || // Out of range
  15. code > 1114111
  16. ) {
  17. return '\uFFFD'
  18. }
  19. return fromCharCode(code)
  20. }
  21. module.exports = safeFromInt