amark on master
argh, axe needed skip reset. + … is this good enough? it's alive!!!! and 3 more (compare)
amark on master
fix ws error/reconnect ordering requery - oye, hopefully safer perf seemed worth it to add MC … and 4 more (compare)
const gun = GUN({ peers: ["<ip>:80/gun"] });
but it doesnt seem to be working
I think I'm doing something wrong and possibly stupid.
const gunSpace = Gun(['https://gunjs.herokuapp.com/gun']).get(appSpace);
gunSpace.put('name' : 'my name');
console.log(gunSpace.get('name')); // <-- [Object Object]
what am I missing? i Just want to get the 'my name' string.
const value = await gunSpace.get('name')
or you can use await and do
const value = await gunSpace.get('name')
https://gun.eco/docs/API#-a-name-then-a-gun-then-cb-not-official-yet-
also Bullet.js does some cool stuff but i went down the same hole the gun way makse sence if you start thinking in graphs
bob.get('shared')put('yolo').grant(gun.get('~@Alice'))
then can the Alice see gun.get('~@bob').get('shared')
or does it also need to be placed in a public place. with something like bob> gun.get('shared').put(bob.get(shared))
// Alice can read but Keven cant??
.put(position)
every say 50ms, but its pretty resource intensive and has a lot of latency
a question about data modeling. How can I handle objects with arrays in it? Example:
let object = {
scopes : [
{ name: 'a'},
{ name: 'b'}
],
value : 'my value'
do I have any alternative other than decomposing the object and the array and saving into gun using gun.set() ?
use
function at line 15 of SEA.js. Anyone have some experience using Gun in Expo, or interest in helping sort out a demonstration? I am interested in building a simple client/server monorepo that demonstrates basic auth and chat.
// does login here
let machines = gun.user().get('machines');
let machine = gun.user().get('machine/tesseract');
machine.put({faces: 24, cells: 8, edges: 32});
machines.set(machine);
// let's add machine to the list of machines;
let machine2 = gun.user().get('machine/tesseract2');
machine2.put({faces: 1, cells: 1, edges: 1});
machines.set(machine2);
gun.user().get('machines').map().once(() => {
//this is called once only with machine, not machine2
})
fs
etc. (?) Or one of you want to do a screencall with me to see why webpack has changed... for the 7th time in 5 years? They really make library dev life miserable by constantly changing.gun.user()
and then reuse it several other places, same as with vanilla. What env are you in?once()
usually calls undefined
if no data can be found within some timespan on the current network. However .map()
will make things stream, so you'd want to .once(checkNotFound).map().once()
just got released, if anyone wants to download agregore, here is the release link
https://github.com/AgregoreWeb/agregore-browser/releases/tag/v1.0.0-44
gun.js:1008 Uncaught TypeError: Cannot read properties of undefined (reading 'push')
at walk (gun.js:1008)
at Gun.chain.put (gun.js:1045)
at Object.goCiM.@parcel/transformer-js/src/esmodule-helpers.js (index.ts:5)
at newRequire (index.aaf1df02.js:71)
at index.aaf1df02.js:120
at index.aaf1df02.js:143
.certify(
instead like @rococtz :clap: linked.GUN().get('top').put('primitive')
root level nodes need to be objects. Code crashed before getting to error message, been causing confusion for people, latest main properly logs what to do. Sorry about that!