Rocky_Mountain_Vending/.pnpm-store/v10/files/ef/23feb5e8ade8f1f6b8a91c8b4f6daad76456518459c933db1fca6495252b5ff217db97e1ed0cdb86195a7336676b0fd0b30075fdcab1f965123f4c30b8a983
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
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>
2026-02-12 16:22:15 -07:00

18 lines
431 B
Text

import * as Either from 'fp-ts/Either';
import { pipe } from 'fp-ts/function';
const arrayToPath = (paths: Either.Either<string, number>[]): string =>
paths.reduce(
(previous, path, index) =>
pipe(
path,
Either.fold(
(key) => `${index > 0 ? '.' : ''}${key}`,
(key) => `[${key}]`,
),
(path) => `${previous}${path}`,
),
'',
);
export default arrayToPath;