Skip to content

Commit

Permalink
feat(tools): add preliminary camt.053 parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanvanherwijnen committed Oct 7, 2024
1 parent 556730c commit bb7350d
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
"vue-eslint-parser": "^9.4.3"
},
"dependencies": {
"@rgrove/parse-xml": "^4.1.0",
"fast-xml-parser": "^4.5.0",
"handlebars": "^4.7.8",
"ibantools": "^4.5.1"
}
Expand Down
14 changes: 14 additions & 0 deletions packages/tools/src/camt/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { type X2jOptions, XMLParser } from 'fast-xml-parser'

export const parseCamt053 = ({
xml,
options
}: {
xml: string
options: X2jOptions
}) => {
const parser = new XMLParser(options)
const json = parser.parse(xml)

return json.Document
}
25 changes: 25 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit bb7350d

Please sign in to comment.