node/tools/eslint/node_modules/micromark/lib/character/ascii-control.mjs
Michaël Zasso 2eff28fb7a
tools: move ESLint to tools/eslint
Greatly simplify how ESLint and its plugins are installed.

PR-URL: https://github.com/nodejs/node/pull/53413
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-06-19 19:54:08 +00:00

12 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
)
}