ensureUniqueString

Function

Given an array of strings, add a value and ensure it is unique by incrementing a suffix number

  • ensureUniqueString(entries: string[], value: string) : string

Parameters

Parameter Type Default Notes
entries Required string[]

array of strings

value Required string

string to uniqueify and add

Returns

string

Function defined in common/src/utils/ensure-unique-string.ts:8