Next.js website for Rocky Mountain Vending company featuring: - Product catalog with Stripe integration - Service areas and parts pages - Admin dashboard with Clerk authentication - SEO optimized pages with JSON-LD structured data Co-authored-by: Cursor <cursoragent@cursor.com>
9 lines
297 B
Text
9 lines
297 B
Text
const { isArray } = Array;
|
|
|
|
/**
|
|
* Used in operators and functions that accept either a list of arguments, or an array of arguments
|
|
* as a single argument.
|
|
*/
|
|
export function argsOrArgArray<T>(args: (T | T[])[]): T[] {
|
|
return args.length === 1 && isArray(args[0]) ? args[0] : (args as T[]);
|
|
}
|