Skip to content

Generic Parser #606

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft

Generic Parser #606

wants to merge 7 commits into from

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