 
     c = csv().from.stream(csvIn).to.stream(csvOut)
     .transform (row, idx, done) =>
-      if idx == 0 and @_options.includesHeaderRow
+      if idx is 0 and @_options.includesHeaderRow
         headers = row
         newHeaders = @_options.mapping.transformHeader row
         done null, newHeaders
       else
-        if idx == 0
-          headers = _.map _.range(row.length), (idx) ->
-            "#{idx}"
+        if idx is 0
+          headers = _.map _.range(row.length), (idx) -> "#{idx}"
 
         @_options.mapping.transformRow @_convertToObject(headers, row)
         .then (converted) =>

    d.promise

  transform: (value) ->
    keyIdx = if typeof @_keyCol == "string" then @_headers.indexOf(@_keyCol) else @_keyCol
    valueIdx = if typeof @_valueCol == "string" then @_headers.indexOf(@_valueCol) else @_valueCol

    if keyIdx < 0 or valueIdx < 0
      throw new Error("Something is wrong in lookup config: key '#{@_keyCol}' or value '#{@_valueCol}' column not found by name!.")

    found = _.find @_values, (row) -> row[keyIdx] == value

    if found
      found[valueIdx]
    else
      throw new Error("Unfortunately, lookup transformation filed for value '#{value}'.#{if @_file then "File: #{@_file}." else ""} Values: #{@_values.join "; "}")

class ColumnMapping
  init: (options) -> util.abstractMethod() # promise with this


      if transformed.length < size and pad
        _s.pad(transformed, size, pad)
      else if transformed.length is size
        transformed
      else
        throw new Error("Generated column part size (#{transformed.length} - '#{transformed}') is smaller than expected size (#{size}) and no padding is defined for this column. Source column '#{fromCol}', generated column '#{@_toCol}' (part #{idx}) with current value '#{value}'.")
