Skip to content

Commit

Permalink
feat: export each extractor's parser (#285)
Browse files Browse the repository at this point in the history
  • Loading branch information
carlbrugger authored Oct 19, 2023
1 parent e215c59 commit 59cb901
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .changeset/rare-parents-swim.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@flatfile/plugin-delimiter-extractor': patch
'@flatfile/plugin-export-workbook': patch
'@flatfile/plugin-json-extractor': patch
'@flatfile/plugin-xlsx-extractor': patch
'@flatfile/plugin-xml-extractor': patch
---

Export parsers
2 changes: 2 additions & 0 deletions plugins/delimiter-extractor/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,5 @@ export const DelimiterExtractor = (
...restOptions,
})
}

export const delimiterParser = parseBuffer
2 changes: 2 additions & 0 deletions plugins/json-extractor/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ export const JSONExtractor = (options?: {
return Extractor('.json', 'json', parseBuffer, options)
}

export const jsonParser = parseBuffer

/*
* @deprecated use `JSONExtractor` instead
*/
Expand Down
2 changes: 2 additions & 0 deletions plugins/xlsx-extractor/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ export const ExcelExtractor = (options?: ExcelExtractorOptions) => {
)
}

export const excelParser = parseBuffer

/*
* @deprecated use `ExcelExtractor` instead
*/
Expand Down
2 changes: 2 additions & 0 deletions plugins/xml-extractor/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ export const XMLExtractor = (options?: {
}) => {
return Extractor('.xml', 'xml', parseBuffer, options)
}

export const xmlParser = parseBuffer

0 comments on commit 59cb901

Please sign in to comment.