UNPKG

@humanspeak/svelte-headless-table

Version:

A powerful, headless table library for Svelte that provides complete control over table UI while handling complex data operations like sorting, filtering, pagination, grouping, and row expansion. Build custom, accessible data tables with zero styling opin

10 lines (9 loc) 305 B
import { getCounter } from './counter.js'; export const getDistinct = (items) => { return Array.from(getCounter(items).keys()); }; export const getDuplicates = (items) => { return Array.from(getCounter(items).entries()) .filter(([, count]) => count !== 1) .map(([key]) => key); };