From d5f54e78a025638f062bd8f40a283c9bdb2a5e99 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Thu, 4 May 2017 16:16:13 +1000 Subject: src/ljstype.js: Add lisprint --- src/ljstype.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/ljstype.js b/src/ljstype.js index 424140e..2528f74 100644 --- a/src/ljstype.js +++ b/src/ljstype.js @@ -8,6 +8,10 @@ const lisxdigit = function(c) { return /^[0-9a-fA-F]$/.test(String.fromCharCode(c)); }; +const lisprint = function(c) { + return /^[\x20-\x7E]$/.test(String.fromCharCode(c)); +}; + const lisspace = function(c) { return /^\s$/.test(String.fromCharCode(c)); }; @@ -23,5 +27,6 @@ const lislalnum = function(c) { module.exports.lisdigit = lisdigit; module.exports.lislalnum = lislalnum; module.exports.lislalpha = lislalpha; +module.exports.lisprint = lisprint; module.exports.lisspace = lisspace; module.exports.lisxdigit = lisxdigit; -- cgit v1.2.3-70-g09d2