terminology.js 678 B

1234567891011121314151617181920212223242526
  1. //
  2. // Implementation of Encoding specification
  3. // https://encoding.spec.whatwg.org/
  4. //
  5. //
  6. // 4. Terminology
  7. //
  8. /**
  9. * An ASCII byte is a byte in the range 0x00 to 0x7F, inclusive.
  10. * @param {number} a The number to test.
  11. * @return {boolean} True if a is in the range 0x00 to 0x7F, inclusive.
  12. */
  13. export function isASCIIByte(a) {
  14. return 0x00 <= a && a <= 0x7F;
  15. }
  16. /**
  17. * An ASCII code point is a code point in the range U+0000 to
  18. * U+007F, inclusive.
  19. */
  20. export var isASCIICodePoint = isASCIIByte;
  21. /**
  22. * End-of-stream is a special token that signifies no more tokens
  23. * are in the stream.
  24. * @const
  25. */ export var end_of_stream = -1;
  26. //# sourceMappingURL=terminology.js.map