unjs / rc9

Read/Write config couldn't be easier!
Other
269 stars 5 forks source link

Simplify first example #107

Closed thenbe closed 3 months ago

thenbe commented 6 months ago

Describe the feature

Hi! Maybe it's just me, but the spaces in the first example make it a bit confusing.

db.username=db username
db.password=db pass
db.enabled=true

I think the username is db username (not just db or just username)? The example might lead folks to believe that spaces are some sort of special nesting delimiter since usernames typically never contain a space character.


Since this snippet is already trying to introduce "new" syntax to the reader, it might be worth keeping it super clear by eliminating the space and avoiding repetitive values for key/value pairs. For example:

user.shortname=mario
user.longname=super mario
user.enabled=true

idk or maybe I should just get some sleep :)

Additional information

manniL commented 6 months ago

Maybe sth like:

db.username=name
db.password=some password here
db.enabled=true