Created
February 17, 2016 10:50
-
-
Save hendrikras/9235eab9c7747cfdfdc5 to your computer and use it in GitHub Desktop.
parse function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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