TodePond / Habitat

my javascript helpers
MIT License
45 stars 5 forks source link

Rethink `_` #75

Open TodePond opened 1 year ago

TodePond commented 1 year ago

Should it have a clearer name? Should it have a helper for parsing too?

TodePond commented 1 year ago

It's currently filling in for #[3, 2] and #{foo: 3, bar: 2} so maybe it would be better have it behave more specifically for object vs array args? or something

and it needs to be usable as a read-only object/array, and also a key for a map, or a value in a set

TodePond commented 1 year ago

its fine

TodePond commented 1 year ago

reopening - had a thought that this could become more of a 'serialise' function in general.

and objects could set something like toJSON or [Symbol.serialiser] to tap into it