Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

24 lines (21 sloc) 0.449 kb
# Description:
# sandbox - run javascript in a sandbox!
#
# Dependencies:
# "sandbox": "0.8.3"
#
# Configuration:
# None
#
# Commands:
# hubot (run|sandbox) <javascript> - Execute the javascript code
#
# Author:
# ajacksified
Sandbox = require('sandbox')
module.exports = (robot) ->
robot.respond /(run|sandbox|js) (.*)/i, (msg) ->
sandbox = new Sandbox
sandbox.run(msg.match[2], (output) ->
msg.send output.result
)
Jump to Line
Something went wrong with that request. Please try again.