diff --git a/lib/time.js b/lib/time.js index 49781786..8fb429ce 100644 --- a/lib/time.js +++ b/lib/time.js @@ -1,3 +1,7 @@ +if(typeof window === "undefined"){ //Not in the browser, Include from node + var Gun = require('gun/gun'); +} + ;(function(){ var ify = Gun.node.ify, u; Gun.chain.time = function(data, a, b){ @@ -139,4 +143,4 @@ at = at.slice(-7); return new Date(Date.UTC(at[0], parseFloat(at[1])-1, at[2], at[3], at[4], at[5], at[6])); } -}()); \ No newline at end of file +}());