summaryrefslogtreecommitdiff
path: root/share/server
diff options
context:
space:
mode:
Diffstat (limited to 'share/server')
-rw-r--r--share/server/loop.js1
-rw-r--r--share/server/util.js4
2 files changed, 5 insertions, 0 deletions
diff --git a/share/server/loop.js b/share/server/loop.js
index d5bbd977..d2a07f61 100644
--- a/share/server/loop.js
+++ b/share/server/loop.js
@@ -26,6 +26,7 @@ function init_sandbox() {
sandbox.start = Render.start;
sandbox.send = Render.send;
sandbox.getRow = Render.getRow;
+ sandbox.isArray = isArray;
} catch (e) {
log(e.toSource());
}
diff --git a/share/server/util.js b/share/server/util.js
index 71a36a29..1b57f041 100644
--- a/share/server/util.js
+++ b/share/server/util.js
@@ -124,3 +124,7 @@ function log(message) {
}
respond(["log", String(message)]);
};
+
+function isArray(obj) {
+ return toString.call(obj) === "[object Array]";
+}