sharkey/src/web/app/common/scripts/log.ls
2016-12-29 07:49:51 +09:00

19 lines
217 B
Plaintext

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