Merge pull request #534 from masterex1000/master

Add Node Support To gun/lib/time.js
This commit is contained in:
Mark Nadal 2018-05-16 10:46:02 -07:00 committed by GitHub
commit 6315dcad51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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]));
}
}());
}());