Skip to content

Commit

Permalink
feat: Can use '*' as a wildcard to provide default processing for rows
Browse files Browse the repository at this point in the history
Rather than just letting them drop out into unknown
  • Loading branch information
jezhiggins committed Jun 27, 2018
1 parent 23dc410 commit c8f7ddc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/File-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ class FileBuilder {
let value = line[columnIndex]
if (valueToDirMap.hasOwnProperty(value)) {
value = valueToDirMap[value]
} else if (valueToDirMap.hasOwnProperty('*')) {
value = valueToDirMap['*']
} else {
value = UNKNOWN_DIR
}
Expand All @@ -65,6 +67,8 @@ class FileBuilder {
}
if (valueToFileMap.hasOwnProperty(matchingKey)) {
value = valueToFileMap[matchingKey]
} else if (valueToFileMap.hasOwnProperty('*')) {
value = valueToFileMap['*']
} else {
value = {filename: UNKNOWN_FILENAME}
}
Expand Down

0 comments on commit c8f7ddc

Please sign in to comment.