generated from ryoppippi/deno-jsr-template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(openai/mod.ts): refactor parser creation into a function
The parser creation logic was duplicated in two places. This commit refactors it into a new function `createParser`. This function takes a validate function and returns a parser that validates and parses the input string into a JSON object. This change makes the code more DRY (Don't Repeat Yourself) and easier to maintain.
- Loading branch information
Showing
1 changed file
with
16 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters