Skip to content

Instantly share code, notes, and snippets.

@hendrikras
Created February 17, 2016 10:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hendrikras/9235eab9c7747cfdfdc5 to your computer and use it in GitHub Desktop.
Save hendrikras/9235eab9c7747cfdfdc5 to your computer and use it in GitHub Desktop.
parse function
function parseCSV(file) {
return $q(function(resolve, reject) {
Papa.parse(file, {
complete: resolve,
error: reject,
delimiter: ',',
dynamicTyping: true,
header:true,
fields: ['Name', 'Sirname', 'Age', 'Occupation']
});
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment