mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-02 18:11:04 +08:00
DISABLE_THIRD_PARTY_CHECK=NPM update R=jacktfranklin@chromium.org Bug: none Change-Id: I41b7006f336b9465677cc7434abd70a732c58221 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2692907 Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
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
|
|
)
|
|
}
|