1.0.4 • Published 2 months ago

davinci-csv v1.0.4

Weekly downloads
5
License
MIT
Repository
github
Last release
2 months ago

davinci-csv

Comma Separated Value (CSV) Library for JavaScript with TypeScript d.ts files.

Example.

import {parse, Dialect, Field} from 'davinci-csv'

/**
 * Parse CSV from the contents of a script tag with the specified identifier.
 */
function csvFromScriptElementId(id: string, dialect?: Dialect): Field[][] {
    const dataElement = document.getElementById(id)
    if (dataElement) {
        const csvText = dataElement.innerText
        return parse(csvText, dialect)
    }
    else {
        throw new Error(`${id} is not a valid element id`)
    }
}
1.0.2

2 months ago

1.0.4

2 months ago

1.0.3

2 months ago

1.0.1

1 year ago

1.0.0

4 years ago

0.9.12

7 years ago

0.9.11

7 years ago

0.9.10

7 years ago

0.9.9

7 years ago

0.9.8

7 years ago

0.9.7

7 years ago

0.9.5

7 years ago

0.9.4

7 years ago

0.9.3

7 years ago