UNPKG

hubot-command-mapper

Version:
13 lines (12 loc) 323 B
export function hasSwitch(robot, name) { if (!robot.__switches) return false; return robot.__switches.indexOf(name) != -1; } export function setSwitch(robot, name) { if (hasSwitch(robot, name)) return; if (!robot.__switches) robot.__switches = []; robot.__switches.push(name); }