Skip to content

Commit

Permalink
delimiter: fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
wdavidw committed Jul 21, 2016
1 parent 0f7301d commit c11d256
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions lib/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions src/index.coffee.md
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ Implementation of the [`stream.Transform` API][transform]
continue
else if @field and not @options.relax
throw Error "Invalid opening quote at line #{@lines+1}"
# Otherwise, treat quote as a regular character
# Otherwise, treat quote as a regular character
isRowDelimiter = (@options.rowDelimiter and chars.substr(i, @options.rowDelimiter.length) is @options.rowDelimiter)
@lines++ if isRowDelimiter or (end and i is l - 1)
# Set the commenting flag
Expand Down Expand Up @@ -354,9 +354,9 @@ Implementation of the [`stream.Transform` API][transform]
else
i++
if not @commenting and @field.length > @options.max_limit_on_data_read
throw Error "Delimter not found in the file #{JSON.stringify(@options.delimiter)}"
throw Error "Delimiter not found in the file #{JSON.stringify(@options.delimiter)}"
if not @commenting and @line.length > @options.max_limit_on_data_read
throw Error "Row delimter not found in the file #{JSON.stringify(@options.rowDelimiter)}"
throw Error "Row delimiter not found in the file #{JSON.stringify(@options.rowDelimiter)}"
# Flush remaining fields and lines
if end
if rtrim
Expand All @@ -365,11 +365,11 @@ Implementation of the [`stream.Transform` API][transform]
@line.push auto_parse @field
@field = ''
if @field.length > @options.max_limit_on_data_read
throw Error "Delimter not found in the file #{JSON.stringify(@options.delimiter)}"
throw Error "Delimiter not found in the file #{JSON.stringify(@options.delimiter)}"
if l is 0
@lines++
if @line.length > @options.max_limit_on_data_read
throw Error "Row delimter not found in the file #{JSON.stringify(@options.rowDelimiter)}"
throw Error "Row delimiter not found in the file #{JSON.stringify(@options.rowDelimiter)}"
# Store un-parsed chars for next call
@buf = ''
while i < l
Expand Down
2 changes: 1 addition & 1 deletion test/delimiter.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@ describe 'delimiter', ->
a,b,c
a,b,c
""", delimiter: ':', rowDelimiter: '\t\t', max_limit_on_data_read: 10, (err, data) ->
err.message.should.eql 'Delimter not found in the file ":"' if err
err.message.should.eql 'Delimiter not found in the file ":"' if err
should(data).not.be.ok()
next()
2 changes: 1 addition & 1 deletion test/rowDelimiter.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,6 @@ describe 'rowDelimiter', ->
a,b,c
a,b,c
""", delimiter: ',', rowDelimiter: '\t', max_limit_on_data_read: 10, (err, data) ->
err.message.should.eql 'Row delimter not found in the file "\\t"'
err.message.should.eql 'Row delimiter not found in the file "\\t"'
should(data).not.be.ok()
next()

0 comments on commit c11d256

Please sign in to comment.