All checks were successful
Publish To Prod / deploy_and_publish (push) Successful in 35s
13 lines
325 B
JavaScript
13 lines
325 B
JavaScript
export default asciiControl
|
|
|
|
import codes from './codes.mjs'
|
|
|
|
// 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
|
|
)
|
|
}
|