From f782f7395cd287d4767c1f3ffd20a72a51007595 Mon Sep 17 00:00:00 2001 From: Florrie Date: Wed, 30 May 2018 23:55:12 -0300 Subject: Add isCaselessLetter util function --- util/telchars.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/util/telchars.js b/util/telchars.js index 6908600..b39e17b 100644 --- a/util/telchars.js +++ b/util/telchars.js @@ -35,6 +35,8 @@ const telchars = { isShiftDown: buf => buf[0] === 0x1b && compareBufStr(buf.slice(1), '[1;2B'), isShiftRight: buf => buf[0] === 0x1b && compareBufStr(buf.slice(1), '[1;2C'), isShiftLeft: buf => buf[0] === 0x1b && compareBufStr(buf.slice(1), '[1;2D'), + + isCaselessLetter: (buf, letter) => compareBufStr(buf, letter.toLowerCase()) || compareBufStr(buf, letter.toUpperCase()), } module.exports = telchars -- cgit 1.3.0-6-gf8a5