Created
October 23, 2013 21:49
-
-
Save aliou/7127407 to your computer and use it in GitHub Desktop.
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
var DayOne = require('dayone').DayOne; | |
var DayOneEntry = require('dayone').DayOneEntry; | |
var dayone = new DayOne(); | |
dayone.list({'tags': ['randomidea']}, function(err, entries) { | |
var new_entries = entries.sort(function(a, b) { | |
if (a.creationDate > b.creationDate) | |
return 1; | |
if (a.creationDate < b.creationDate) | |
return -1; | |
return 0; | |
}); | |
new_entries.forEach(function(entry) { | |
console.log(entry.text); | |
console.log('---------------'); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment