Skip to content

Conversation

@jonchurch
Copy link
Member

@jonchurch jonchurch commented Apr 8, 2025

An attempt at solving for #22 (specifically #22 (comment)) and sketching out what the generic interaface would look like.

This is a draft so we can see the diff cleanly, but it's my intent for Generic ot be hashed out on the generic branch.

This is an approach which encapsulates Generic as the only middleware to have a parser option.

Users of generic would be required to bring a type and a sync parse function

*/

function generic (options) {
// === STEP 0: VALIDATE OPTIONS ===
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Breaking this function down into steps was very helpful for me when wrapping my head around what was a universal concern vs parser specfic. leaving them here hoping they help others

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant