mizzkey/src/web/app/common/scripts/log.ls

19 lines
217 B
Plaintext
Raw Normal View History

2016-12-28 23:49:51 +01:00
riot = require \riot
logs = []
ev = riot.observable!
function log(msg)
logs.push do
date: new Date!
message: msg
ev.trigger \log
riot.mixin \log do
logs: logs
log: log
log-event: ev
module.exports = log