exports.endsWith = (str, suffix) -> str.indexOf(suffix, str.length - suffix.length) isnt -1 exports.arrayToHash = (arr) -> hash = {} for i in arr hash[i[0]] = i[1] return hash