Skip to content

Commit

Permalink
[escapeChar][xs]: using double quotes as escape character - refs dato…
Browse files Browse the repository at this point in the history
  • Loading branch information
anuveyatsu committed Feb 7, 2018
1 parent fbea43f commit 398235d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,11 @@ class File {
// Get parserOptions so we can use it when "infering" schema:
const parserOptions = await guessParseOptions(this)
// We also need to include parserOptions in "dialect" property of descriptor:
this.descriptor.dialect = parserOptions
this.descriptor.dialect = {
delimiter: parserOptions.delimiter,
quoteChar: parserOptions.quote,
escapeChar: '"' // Setting it as double quote so we have standard escape character (it's same for our csv parser)
}
// Now let's get a stream from file and infer schema:
const stream = await this.stream()
this.descriptor.schema = await infer(stream, parserOptions)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "data.js",
"version": "0.10.4",
"version": "0.10.5",
"description": "",
"main": "lib/index.js",
"directories": {
Expand Down

0 comments on commit 398235d

Please sign in to comment.