From ed083ad3191a5d7d61abb21fa7dafec5121ecaab Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Fri, 25 Sep 2015 18:05:37 -0400 Subject: post comment --- bucky/util/util.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'bucky/util/util.js') diff --git a/bucky/util/util.js b/bucky/util/util.js index e67488b..d4b6b8a 100644 --- a/bucky/util/util.js +++ b/bucky/util/util.js @@ -2,3 +2,5 @@ var util = module.exports = {} util.sanitizeName = function (s){ return (s || "").replace(new RegExp("[^-_a-zA-Z0-9]", 'g'), "") } util.sanitize = function (s){ return (s || "").replace(/<>&/g, "") } + +util.now = function(){ return Math.floor( (+ new Date()) / 1000 ) } -- cgit v1.2.3-70-g09d2