Skip to content

Commit eba0010

Browse files
author
Sophia Marie Terry
committed
CLOUDP-328959: Added helper method for stripping custom method names
1 parent cbaf505 commit eba0010

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tools/spectral/ipa/rulesets/functions/utils/resourceEvaluation.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ export function getCustomMethodName(path) {
5757
return path.split(':')[1];
5858
}
5959

60+
export function stripCustomMethodName(path){
61+
return path.substring(0, path.indexOf(':'));
62+
}
63+
6064
export function isPathParam(string) {
6165
return string.startsWith('{') && string.endsWith('}');
6266
}

0 commit comments

Comments
 (0)