Why Nostr? What is Njump?
2023-10-22 14:58:47
in reply to

Scott H. on Nostr: If you don't want to use Lodash, you can use this trick: foo[bar]=foo[bar] || {} ...

If you don't want to use Lodash, you can use this trick:

foo[bar]=foo[bar] || {}
foo[bar][foobar]=null

This makes sure you don't clobber the branches as you build the graph.

This method isn't that far off from the design of NetworkX in Python land. I only use two functions from Lodash: setWith and get. Use lodash-cli to get a custom build.
Author Public Key
npub1uvngpgxxg7qxguq7fy5k52cf6xk6tvnkx78nxpsqelqpry90atrsycdplu