MCPcopy Create free account
hub / github.com/TanStack/ai / uniqueStrings

Function uniqueStrings

packages/ai-devtools/src/components/hooks/preview-model.ts:177–190  ·  view source on GitHub ↗
(
  values: Array<string | null | undefined>,
)

Source from the content-addressed store, hash-verified

175}
176
177function uniqueStrings(
178 values: Array<string | null | undefined>,
179): Array<string> {
180 const result: Array<string> = []
181 const seen = new Set<string>()
182
183 for (const value of values) {
184 if (!value || seen.has(value)) continue
185 seen.add(value)
186 result.push(value)
187 }
188
189 return result
190}
191
192function splitDataIds(value: string | null | undefined): Array<string> {
193 if (!value) return []

Callers 1

createHoverTargetFunction · 0.85

Calls 2

hasMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected