Helper functions for Dobo Extra
- Source
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:
Properties- object
| Name | Type | Description |
|---|---|---|
parse | function | Parse CSV data |
stringify | function | Stringify data to CSV format |
- Source
(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:
Properties- object
| Name | Type | Description |
|---|---|---|
parse | function | Parse JSON data |
stringify | function | Stringify data to JSON format |
- Source
(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:
Properties- object
| Name | Type | Description |
|---|---|---|
parse | function | Parse NDJSON data |
stringify | function | Stringify data to NDJSON format |
- Source
(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:
Properties- object
| Name | Type | Description |
|---|---|---|
parse | function | Parse XLSX data |
stringify | function | Stringify data to XLSX format |
- Source