mirror of
https://github.com/amark/gun.git
synced 2025-03-30 15:08:33 +00:00
Merge pull request #534 from masterex1000/master
Add Node Support To gun/lib/time.js
This commit is contained in:
commit
6315dcad51
@ -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]));
|
||||
}
|
||||
}());
|
||||
}());
|
||||
|
Loading…
x
Reference in New Issue
Block a user