Anton Shestakov <av6@dwimlabs.net>, Fri, 25 Mar 2016 00:24:05 +0800
index: background color depends on bare jid since 96aec8cf1ae9
coffee/rivets.coffee
Permissions: -rw-r--r--
observe: (obj, keypath, callback) -> obj.on('change:' + keypath, callback) unobserve: (obj, keypath, callback) -> obj.off('change:' + keypath, callback) set: (obj, keypath, value) -> rivets.formatters['first-letter'] = (value) -> rivets.formatters['only'] = (value, allowed...) -> if value in allowed then value else '' rivets.formatters['eq'] = (a, b) -> rivets.formatters['format-date'] = (value, format) -> if value? then value.format(format) else '' rivets.formatters['iso-date'] = (value) -> if value? then value.toISOString() else '' rivets.formatters['from-now'] = (value) -> if value? then value.fromNow() else ''