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>
22 lines
No EOL
449 B
Text
22 lines
No EOL
449 B
Text
"use strict";
|
|
|
|
module.exports = (arr_, pred) => {
|
|
|
|
const arr = arr_ || [],
|
|
spans = []
|
|
|
|
let span = { label: undefined,
|
|
items: [arr.first] }
|
|
|
|
arr.forEach (x => {
|
|
|
|
const label = pred (x)
|
|
|
|
if ((span.label !== label) && span.items.length) {
|
|
spans.push (span = { label: label, items: [x] }) }
|
|
|
|
else {
|
|
span.items.push (x) } })
|
|
|
|
return spans
|
|
} |