Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
tests.push(client.run(function(test){
Gun.state.drift = Math.random() * 10000;
localStorage.clear();
var env = test.props;
test.async();
var peers = [], i = env.i;
//while(i--){
peers.push('http://'+ env.config.IP + ':' + (env.config.port + (i)) + '/gun');
//}
console.log("Connect to", peers);
var gun = Gun(peers);
var num = 0, total = 0, check = Gun.obj.map(env.ids, function(v,id,t){
var i = env.config.each;
while(i--){
t(id + (i + 1), 1);
total += 1;
}
});
const update = () => {
gun.user().get(`lastActive`).put(Math.round(Gun.state() / 1000));
};
update();