Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function randomizeObs(o) {
var r = JSON.parse(JSON.stringify(o));
r.id = randomBytes(8).toString("hex");
r.version = randomBytes(32).toString("hex");
r.created_at = addDateFuzz(o.created_at);
r.timestamp = addDateFuzz(o.timestamp, r.created_at);
var pos = randomPosition(bbox);
r.value.lon = pos[0];
r.value.lat = pos[1];
r.value.tags = {
notes: txtgen.sentence(),
categoryId: o.value.tags.categoryId
};
return r;
}