1.0.4 • Published 1 year ago

davinci-csv v1.0.4

Weekly downloads
5
License
MIT
Repository
github
Last release
1 year 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

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.1

2 years ago

1.0.0

5 years ago

0.9.12

8 years ago

0.9.11

8 years ago

0.9.10

8 years ago

0.9.9

8 years ago

0.9.8

8 years ago

0.9.7

8 years ago

0.9.5

8 years ago

0.9.4

8 years ago

0.9.3

8 years ago