Created
December 5, 2013 07:38
-
-
Save raimohanska/7801563 to your computer and use it in GitHub Desktop.
Bacon.Observable.prototype.logWithTimestamp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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