Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
22 lines (19 sloc) 473 Bytes
# Description:
# Base64 encoding and decoding
#
# Dependencies:
# None
#
# Configuration:
# None
#
# Commands:
# hubot base64 encode|decode <query> - Base64 encode or decode <string>
#
# Author:
# jimeh
module.exports = (robot) ->
robot.respond /base64 encode( me)? (.*)/i, (msg) ->
msg.send new Buffer(msg.match[2]).toString('base64')
robot.respond /base64 decode( me)? (.*)/i, (msg) ->
msg.send new Buffer(msg.match[2], 'base64').toString('utf8')
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.