Skip to content

Commit bb7350d

Browse files
feat(tools): add preliminary camt.053 parsing
1 parent 556730c commit bb7350d

3 files changed

Lines changed: 41 additions & 0 deletions

File tree

packages/tools/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@
3838
"vue-eslint-parser": "^9.4.3"
3939
},
4040
"dependencies": {
41+
"@rgrove/parse-xml": "^4.1.0",
42+
"fast-xml-parser": "^4.5.0",
4143
"handlebars": "^4.7.8",
4244
"ibantools": "^4.5.1"
4345
}

packages/tools/src/camt/index.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { type X2jOptions, XMLParser } from 'fast-xml-parser'
2+
3+
export const parseCamt053 = ({
4+
xml,
5+
options
6+
}: {
7+
xml: string
8+
options: X2jOptions
9+
}) => {
10+
const parser = new XMLParser(options)
11+
const json = parser.parse(xml)
12+
13+
return json.Document
14+
}

pnpm-lock.yaml

Lines changed: 25 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)