PsychoLlama / Reticle

Put a scope on your gunDB data
49 stars 8 forks source link

`__[scope]` might be `_[scope] ` in "index.js" #5

Open jacobbubu opened 7 years ago

jacobbubu commented 7 years ago

On line https://github.com/PsychoLlama/Reticle/blob/master/index.js#L80 The

    gun.__[scope] = gun.__[scope] || preset;

Should be?

    gun._[scope] = gun._[scope] || preset;
PsychoLlama commented 7 years ago

I think you're right @jacobbubu! I wrote this library a while ago when gun was in its infancy (v0.3.x) and the chaining model was different. The "root" of the chain was the double underscore, and the current context was a single underscore. I haven't used this library in a while, but given those API changes, I assume it no longer works. I think Mark added some new stuff which makes these kinds of plugins easier to write too...

I'm on vacation now, but I'll see about taking a look soon. Thanks for bringing this to my attention!

jacobbubu commented 7 years ago

Thank you for sharing this interesting story to me.

JohnYepthomi commented 1 year ago

Yes, there is breaking changes. I am getting this error

Uncaught TypeError: Gun2.on(...).event is not a function
    at node_modules/reticle/index.js (index.js:79:15)
    at __require2 (chunk-NKHIPFFU.js?v=7e334833:15:50)
    at dep:reticle:1:16

I would love to see this library updated.

PsychoLlama commented 1 year ago

Hey @JohnYepthomi. I haven't been involved in the GunDB community for a while. I'll ping the folks over there and see if they want to take control of the project, but it probably won't see updates.