Closed shadowspawn closed 2 years ago
This came out of discussion around potential for prototype pollution. Use a Map rather than Object internally. Convert to Object for returning to client.
See https://github.com/pkgjs/parseargs/issues/32#issuecomment-1013948553
(Why not use Set for flags? Could, but a little easier to convert from Map to Object!)
Set
flags
Map
Object
Thanks for feedback. I'll start again rather than leave this open, as it may be a couple of weeks before I have time.
This came out of discussion around potential for prototype pollution. Use a Map rather than Object internally. Convert to Object for returning to client.
See https://github.com/pkgjs/parseargs/issues/32#issuecomment-1013948553
(Why not use
Set
forflags
? Could, but a little easier to convert fromMap
toObject
!)