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.
14 lines
343 B
14 lines
343 B
'use strict' |
|
|
|
var codes = require('./codes.js') |
|
|
|
// Note: EOF is seen as ASCII control here, because `null < 32 == true`. |
|
function asciiControl(code) { |
|
return ( |
|
// Special whitespace codes (which have negative values), C0 and Control |
|
// character DEL |
|
code < codes.space || code === codes.del |
|
) |
|
} |
|
|
|
module.exports = asciiControl
|
|
|