API script for communicating with the GUI frontend

This commit is contained in:
Zaid Abdulla committed 2012-10-17 00:11:49 +03:00
1 parent ca70f40201
commit 1606d4428c
3 files changed
+91 -6

No files matched your search

+8
View File
@@ -0,0 +1,8 @@
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