UNPKG

ai

Version:

AI SDK by Vercel - build apps like ChatGPT, Claude, Gemini, and more with a single interface for any model using the Vercel AI Gateway or go direct to OpenAI, Anthropic, Google, or any other model provider.

5 lines (4 loc) 141 B
export function mockValues<T>(...values: T[]): () => T { let counter = 0; return () => values[counter++] ?? values[values.length - 1]; }