ascii-control.js 293 B

123456789101112
  1. 'use strict'
  2. // Note: EOF is seen as ASCII control here, because `null < 32 == true`.
  3. function asciiControl(code) {
  4. return (
  5. // Special whitespace codes (which have negative values), C0 and Control
  6. // character DEL
  7. code < 32 || code === 127
  8. )
  9. }
  10. module.exports = asciiControl