summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-05-04 16:16:13 +1000
committerdaurnimator <quae@daurnimator.com>2017-05-04 16:16:13 +1000
commitd5f54e78a025638f062bd8f40a283c9bdb2a5e99 (patch)
treebc068eab43dde80a391038b60c3214145bbc5f58
parent8e68334070a096d8321ceb68f6a7670a2421eb38 (diff)
downloadfengari-d5f54e78a025638f062bd8f40a283c9bdb2a5e99.tar.gz
fengari-d5f54e78a025638f062bd8f40a283c9bdb2a5e99.tar.bz2
fengari-d5f54e78a025638f062bd8f40a283c9bdb2a5e99.zip
src/ljstype.js: Add lisprint
-rw-r--r--src/ljstype.js5
1 files changed, 5 insertions, 0 deletions
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;