(filename)
| 3 | const path = require('path'); |
| 4 | |
| 5 | function extractServiceName(filename) { |
| 6 | filename = path.basename(filename.replace('.normal.json','')); |
| 7 | let components = filename.split('-'); |
| 8 | let prefix = components[0]; |
| 9 | let i = 1; |
| 10 | while (!components[i].startsWith('2')) { |
| 11 | prefix += '-' + components[i]; |
| 12 | i++; |
| 13 | } |
| 14 | return prefix; |
| 15 | } |
| 16 | |
| 17 | module.exports = { |
| 18 | extractServiceName: extractServiceName |
nothing calls this directly
no outgoing calls
no test coverage detected