Skip to content

Commit

Permalink
udpate to the parser example
Browse files Browse the repository at this point in the history
  • Loading branch information
AndresPrez committed Nov 24, 2022
1 parent e3055a1 commit c3dc03f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions website/docs/software/plugins/parser.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ const templateParser: IParser = {
*/
const manifest: TManifest = fsml.utils.createTemplateForType(fsml.standard.Manifest);

/** The data is then feed into a common npm csv parser package which returns a JSON array of the csv rows. */
const rows = csvParser(data)

/** Finally, some custom function can be used to take those rows and format them as required by FSML standard. */
manifest.SupplementalData.data[0].rows = jsonRowsToFsml(rows)

return await Promise.resolve({ manifest });
},
isApplicable: async (file) => {
Expand Down

0 comments on commit c3dc03f

Please sign in to comment.