This file contains 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
# alex's logging function that he likes to use. | |
l = (message, objs...) -> | |
now = new Date() | |
hours = now.getHours() | |
mins = now.getMinutes() | |
secs = now.getSeconds() | |
console.log(["#{ hours }:#{ mins }.#{ secs }", message, objs...]) | |
return | |
# usage: | |
l 'thing1', thing1, 'thing2', thing2 | |
# output: | |
["20:37.21", "thing1", Object, "thing2", Array[7]] | |
0: "20:37.21" | |
1: "thing1" | |
2: Object | |
cow: "moo" | |
__proto__: Object | |
3: "thing2" | |
4: Array[7] | |
0: 1 | |
1: 2 | |
2: 3 | |
3: 4 | |
4: "cow" | |
5: "moo" | |
6: "bark" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment