Skip to content

Commit

Permalink
New prototype funcs
Browse files Browse the repository at this point in the history
  • Loading branch information
Markcreator committed Aug 14, 2018
1 parent a2afbb4 commit 20654c7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions js/util.js
Expand Up @@ -122,3 +122,6 @@ function escapeHtml(unsafe) {
.replace(/"/g, """)
.replace(/'/g, "'");
}

Object.prototype.id = function() { return this._id.$oid; }
Object.prototype.getTime = function() { return new Date(parseInt(this.$date.$numberLong)); }

0 comments on commit 20654c7

Please sign in to comment.