Helper functions for Dobo Extra

Members

(static, constant) csv :object

CSV parser and stringifier.

To be able to use this helper, do something like this:

const { importModule } = this.app.bajo
const { csv } = await importModule('dobo-extra:/lib/helper.js', { asDefaultImport: false })
...
Type:
  • object
Properties
NameTypeDescription
parsefunction

Parse CSV data

stringifyfunction

Stringify data to CSV format

(static, constant) json :object

JSON parser and stringifier. Use stream to handle large JSON files.

To be able to use this helper, do something like this:

const { importModule } = this.app.bajo
const { json } = await importModule('dobo-extra:/lib/helper.js', { asDefaultImport: false })
...
Type:
  • object
Properties
NameTypeDescription
parsefunction

Parse JSON data

stringifyfunction

Stringify data to JSON format

(static, constant) ndjson :object

NDJSON parser and stringifier.

To be able to use this helper, do something like this:

const { importModule } = this.app.bajo
const { ndjson } = await importModule('dobo-extra:/lib/helper.js', { asDefaultImport: false })
console.log(ndjson.parse('{"a":1}\n{"b":2}')) // [{a:1},{b:2}]
console.log(ndjson.stringify([{a:1},{b:2}])) // '{"a":1}\n{"b":2}\n'
Type:
  • object
Properties
NameTypeDescription
parsefunction

Parse NDJSON data

stringifyfunction

Stringify data to NDJSON format

(static, constant) xlsx :object

Excel XLSX parser and stringifier.

To be able to use this helper, do something like this:

const { importModule } = this.app.bajo
const { xlsx } = await importModule('dobo-extra:/lib/helper.js', { asDefaultImport: false })
...
Type:
  • object
Properties
NameTypeDescription
parsefunction

Parse XLSX data

stringifyfunction

Stringify data to XLSX format