* @param fileName - expect to be in snake case , eg: this_is_a_test_file.cc * @returns init function name in the file * * general format of init function name is camelCase version of the snake_case file name
(fileName)
| 12 | * general format of init function name is camelCase version of the snake_case file name |
| 13 | */ |
| 14 | function getExportObjectName (fileName) { |
| 15 | fileName = fileName.split('_').map(token => exceptions.nouns[token] ? exceptions.nouns[token] : token).join('_'); |
| 16 | const str = fileName.replace(/(_\w)/g, (k) => k[1].toUpperCase()); |
| 17 | const exportObjectName = str.charAt(0).toUpperCase() + str.substring(1); |
| 18 | if (exceptions.exportNames[exportObjectName]) { |
| 19 | return exceptions.exportNames[exportObjectName]; |
| 20 | } |
| 21 | return exportObjectName; |
| 22 | } |
| 23 | |
| 24 | /** |
| 25 | * @param fileName - expect to be in snake case , eg: this_is_a_test_file.cc |
no outgoing calls
no test coverage detected