Skip to content

Instantly share code, notes, and snippets.

@ben-ng
Created January 8, 2014 23:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ben-ng/8326943 to your computer and use it in GitHub Desktop.
Save ben-ng/8326943 to your computer and use it in GitHub Desktop.
, getComments: function () {
if(!this.comments)
throw new Error('You need to loadComments before you can get comments');
return this.comments.map(function (comment) {
var obj = comment.toJSON();
obj.relativeDate = relative(obj.updated);
return obj;
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment