MCPcopy Create free account
hub / github.com/APIs-guru/aws2openapi / extractServiceName

Function extractServiceName

helpers.js:5–15  ·  view source on GitHub ↗
(filename)

Source from the content-addressed store, hash-verified

3const path = require('path');
4
5function 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
17module.exports = {
18 extractServiceName: extractServiceName

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected