Skip to content

Instantly share code, notes, and snippets.

@raimohanska
Created December 5, 2013 07:38
Show Gist options
  • Save raimohanska/7801563 to your computer and use it in GitHub Desktop.
Save raimohanska/7801563 to your computer and use it in GitHub Desktop.
Bacon.Observable.prototype.logWithTimestamp
Bacon.Observable.prototype.logWithTimestamp = function() {
var args = Array.prototype.slice.call(arguments, 0)
this.onValue(function(value) {
console.log.apply(console, [new Date().getTime()].concat(args.concat([value])))
})
return this
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment