Commit 27e12e75 authored by Bryan English's avatar Bryan English
Browse files

tty,doc: add type-check to isatty

Previously, various inputs other than non-negative integers would
produce incorrect results.

Added type-checking on input, returning false for anything other than
non-negative integers.

Also clarified in docs.

PR-URL: https://github.com/nodejs/node/pull/15567


Reviewed-By: default avatarLuigi Pinca <luigipinca@gmail.com>
Reviewed-By: default avatarRuben Bridgewater <ruben@bridgewater.de>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
Reviewed-By: default avatarJeremiah Senkpiel <fishrock123@rocketmail.com>
parent b5569dbe
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment