onflow / fcl-js

FCL (Flow Client Library) - The best tool for building JavaScript (browser & NodeJS) applications on Flow 🌊
https://onflow.org
Apache License 2.0
323 stars 117 forks source link

[FEATURE] Nested config values #1902

Open jribbink opened 3 months ago

jribbink commented 3 months ago

Issue to be solved

FCL would greatly benefit from nested config values.

I.e.

fcl.config.get("foo")
// {"bar": 123, "baz": 456}
// where "foo.bar" = 123 & "foo.baz" = 456

This would also streamline setting configuration:

fcl.config({
  foo: {
     bar: 123,
     baz: 456
  }
})

as users can now treat their configuration as a nested hierarchy instead of a flat map of values.

For backward-compatibility, both formats should be supported still.

Suggest A Solution

No response

What are you currently working on that this is blocking?

No response