MCPcopy Create free account
hub / github.com/FeatureProbe/FeatureProbe / getVariationName

Function getVariationName

ui/src/utils/tools.ts:26–38  ·  view source on GitHub ↗
(variations: IVariation[])

Source from the content-addressed store, hash-verified

24};
25
26export const getVariationName = (variations: IVariation[]) => {
27 let name = '';
28 for (let i = 1; i <= 20; i++) {
29 const index = variations.findIndex((variation) => {
30 return variation.name === 'variation' + i;
31 });
32 if (index === -1) {
33 name = 'variation' + i;
34 break;
35 }
36 }
37 return name;
38};
39
40export const stringLimit = (str: string, limit: number) => {
41 if(str.length > limit && limit > 3) {

Callers 2

useVaritionFunction · 0.90
handleAddFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected