diff options
author | Ruben Bridgewater <ruben@bridgewater.de> | 2020-01-10 15:52:33 +0300 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2020-01-12 01:06:45 +0300 |
commit | fe058188a158cea61656b6ecb4517abf4a679353 (patch) | |
tree | 60c4316e6bb2554594fbb950166bdf1e9fa1c8ab /lib/internal/readline | |
parent | 5baae143c7be58e7ea64f15ccab5c2e09afd7e0b (diff) |
repl,readline: clean up code
This simplifies code that was more complicated than it had to be
and removes code that should never be reached.
PR-URL: https://github.com/nodejs/node/pull/31288
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'lib/internal/readline')
-rw-r--r-- | lib/internal/readline/utils.js | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/internal/readline/utils.js b/lib/internal/readline/utils.js index b867dec0cdb..ffe0cee9d4b 100644 --- a/lib/internal/readline/utils.js +++ b/lib/internal/readline/utils.js @@ -136,8 +136,7 @@ if (internalBinding('config').hasIntl) { (code >= 0x1b000 && code <= 0x1b001) || // Enclosed Ideographic Supplement (code >= 0x1f200 && code <= 0x1f251) || - // Miscellaneous Symbols and Pictographs 0x1f300 - 0x1f5ff - // Emoticons 0x1f600 - 0x1f64f + // Miscellaneous Symbols and Pictographs .. Emoticons (code >= 0x1f300 && code <= 0x1f64f) || // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane (code >= 0x20000 && code <= 0x3fffd) @@ -459,9 +458,6 @@ function* emitKeys(stream) { // This runs in O(n log n). function commonPrefix(strings) { - if (!strings || strings.length === 0) { - return ''; - } if (strings.length === 1) { return strings[0]; } |