// Lodash Playground - Utility Library Demo
import _ from 'lodash'
// Make lodash available globally for console testing
window._ = _
const outputEl = document.getElementById('output')
// Helper to render a section
function renderSection(title, code, result) {
const section = document.createElement('div')
section.className = 'p-4 rounded-xl bg-zinc-800/50 border border-zinc-700/50'
section.innerHTML = `
<p class="text-xs text-zinc-500 uppercase tracking-wider mb-2">${title}</p>
<pre class="text-xs text-blue-300 mono mb-2 overflow-x-auto"><code>${code}</code></pre>
<pre class="text-sm text-emerald-400 mono overflow-x-auto"><code>→ ${JSON.stringify(result, null, 2)}</code></pre>
`
outputEl.appendChild(section)
}
// ===== ARRAY METHODS =====
console.log('--- Lodash Array Methods ---')
// _.chunk - Split array into groups
const numbers = [1, 2, 3, 4, 5, 6, 7, 8]
const chunked = _.chunk(numbers, 3)