made with esnextbin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
((global) => { | |
// | |
// GLOBAL VARS AND CONFIGS | |
// | |
let waitTime = 5; | |
let waitForAnswer = true; | |
const ignoreLastMsg = {}; | |
const jokeList = [ |
made with esnextbin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var SimpleRouteParser = function(format) { | |
var namedParam = /\/(:(\w+))/g, | |
names, | |
route, | |
setFormat = function(format) { | |
if (!format) throw new Error('Please specify the url format'); | |
names = []; | |
route = format.replace(namedParam, function(match, param, name) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs'), | |
readCache = {}, | |
Y = require('yui/handlebars'), | |
templates = require('./templates'), | |
partials = templates.getRaw(); | |
function read(path, options, fn) { | |
var str = readCache[path]; | |
// cached (only if cached is a string and not a compiled template function) |