diff options
Diffstat (limited to 'share/server')
-rw-r--r-- | share/server/loop.js | 1 | ||||
-rw-r--r-- | share/server/util.js | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/share/server/loop.js b/share/server/loop.js index 300151e9..a988684f 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]"; +} |