Skip to content

cillay/csv2js.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

csv2js.js

csv2js.js is a JavaScript library for converting CSV text into JavaScript objects.

  • Designed to work right in the browser
  • Plain JS object and AMD module versions
  • No dependencies

loadCollection(url, options) → {array}

Convert text in CSV format to an array of JavaScript objects.

Parameters:
NameTypeDescription
urlstringThe URL for the CSV file.
callbackstringThe callback function that will receive the result.
optionsobjectThe options to define the delimiter and/or firstRowHasHeaders settings.

Source: : - csv2js.js, line 42

Returns:

The array of corresponding JavaScript objects.

Type: array

loadArray(url, callback, options) → {array}

Convert text in CSV format to an array of JavaScript arrays of string.

Parameters:
NameTypeDescription
urlstringThe URL for the CSV file.
callbackstringThe callback function that will receive the result.
optionsobjectThe options to define the delimiter and/or firstRowHasHeaders settings.

Source: : - csv2js.js, line 29

Returns:

The array of corresponding JavaScript arrays.

Type: array

toCollection(csvText, options) → {array}

Convert text in CSV format to an array of JavaScript objects.

Parameters:
NameTypeDescription
csvTextstringThe complete CSV-formatted text as a string.
optionsobjectThe options to define the delimiter and/or firstRowHasHeaders settings.

Source: : - csv2js.js, line 85

Returns:

The array of corresponding JavaScript objects.

Type: array

toArray(csvText, options) → {array}

Convert text in CSV format to an array of JavaScript arrays of string.

Parameters:
NameTypeDescription
csvTextstringThe complete CSV-formatted text as a string.
optionsobjectThe options to define the delimiter and/or firstRowHasHeaders settings.

Source: : - csv2js.js, line 55

Returns:

The array of corresponding JavaScript arrays.

Type: array

About

csv2js.js is a JavaScript library for converting CSV text into JavaScript objects.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors