primatejs / primate

Web framework focused on flexibility and developer freedom
https://primatejs.com
MIT License
200 stars 9 forks source link

create `Dispatcher#getAll(key)` #97

Open terrablue opened 7 months ago

terrablue commented 7 months ago

Dispatchers can often facade a multitude of values per key.

A Dispatcher#getAll(key: string): string[] function would return all values associated with a key.

Would it make sense to create typed versions of getAll, like those of get, that operate on every member of the array? For example, for a given type uuid that verifies a string is a UUID, create a getAllUuid function on request.{query,path,cookies,headers} that evaluates all members of the property.