npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@zvndev/yable-core

v0.2.0

Published

Headless, zero-dependency data table engine with sorting, filtering, editing, formulas, pivot tables, and more

Readme

@zvndev/yable-core

Headless, framework-agnostic data table engine. Zero dependencies.

@zvndev/yable-core is the foundation of the Yable table library. It handles all table logic -- sorting, filtering, pagination, editing, grouping, aggregation, pivot tables, tree data, formulas, clipboard, fill handle, undo/redo, and more -- without touching the DOM. Framework adapters like @zvndev/yable-react and @zvndev/yable-vanilla consume the core to produce UI.

Installation

npm install @zvndev/yable-core

Core Concepts

Table

The central object. Created via createTable(options), it holds all state and exposes methods for sorting, filtering, pagination, editing, selection, and more.

Column

Defined using createColumnHelper<T>() and its .accessor(), .display(), and .group() methods. Columns describe how data maps to cells, how to sort/filter, and how to render headers and footers.

Row

Represents a single data record. Rows provide access to cell values, selection state, expansion state, and pinning. Rows can have sub-rows for tree data.

Cell

The intersection of a row and a column. Cells provide typed value access, editing state, and render context.

Key Exports

Factory Functions

| Export | Description | |---|---| | createTable(options) | Create a table instance from data + column definitions | | createColumnHelper<T>() | Type-safe column definition builder | | createColumn(table, def, depth) | Create a column instance (internal) | | createRow(table, id, original, index, depth) | Create a row instance (internal) | | createHeader(table, column, options) | Create a header instance (internal) |

Built-in Functions

| Export | Description | |---|---| | sortingFns | 6 sorting comparators: alphanumeric, alphanumericCaseSensitive, text, textCaseSensitive, datetime, basic | | filterFns | 11 filter predicates: includesString, equalsString, arrIncludes, arrIncludesAll, arrIncludesSome, equals, weakEquals, inNumberRange, inDateRange, and case-sensitive variants | | aggregationFns | 9 aggregation functions: sum, min, max, extent, mean, median, unique, uniqueCount, count |

Utilities

| Export | Description | |---|---| | functionalUpdate(updater, old) | Apply an Updater<T> (value or function) to a previous value | | memo(deps, fn, opts) | Memoization helper with dependency tracking | | makeStateUpdater(key, table) | Create a state slice updater function |

Event System

| Export | Description | |---|---| | EventEmitterImpl | Typed event emitter with on, off, emit, removeAllListeners |

Basic Usage

import { createTable, createColumnHelper } from '@zvndev/yable-core'

interface Person {
  name: string
  age: number
  email: string
}

// Define columns
const columnHelper = createColumnHelper<Person>()
const columns = [
  columnHelper.accessor('name', { header: 'Name', enableSorting: true }),
  columnHelper.accessor('age', { header: 'Age', enableSorting: true }),
  columnHelper.accessor('email', { header: 'Email' }),
]

// Create data
const data: Person[] = [
  { name: 'Alice', age: 32, email: '[email protected]' },
  { name: 'Bob', age: 27, email: '[email protected]' },
]

// Create table
const table = createTable({
  data,
  columns,
  state: {
    sorting: [{ id: 'name', desc: false }],
  },
  onStateChange: (updater) => {
    // Handle state changes (wire to your framework's state management)
    console.log('State changed')
  },
})

// Read the row model
const rows = table.getRowModel().rows
rows.forEach((row) => {
  const cells = row.getVisibleCells()
  cells.forEach((cell) => {
    console.log(cell.column.id, cell.getValue())
  })
})

Row Model Pipeline

The core processes data through a pipeline of row models:

  1. Core Row Model -- raw data[] converted to Row[]
  2. Filtered Row Model -- column filters and global filter applied
  3. Sorted Row Model -- sorting applied to filtered rows
  4. Paginated Row Model -- page slice of sorted rows

Each stage is memoized. The final table.getRowModel() returns the paginated result.

Feature Overview

| Feature | Table Option | Column Option | |---|---|---| | Sorting | enableSorting, onSortingChange | enableSorting, sortingFn | | Filtering | enableFilters, onColumnFiltersChange, onGlobalFilterChange | enableColumnFilter, filterFn | | Pagination | manualPagination, onPaginationChange | -- | | Cell Editing | enableCellEditing, onEditCommit | editable, editConfig | | Column Pinning | enableColumnPinning | enablePinning | | Column Resizing | enableColumnResizing, columnResizeMode | enableResizing | | Row Selection | enableRowSelection, onRowSelectionChange | -- | | Row Expanding | enableExpanding, getSubRows | -- | | Grouping | enableGrouping, onGroupingChange | enableGrouping, aggregationFn | | Visibility | enableHiding | enableHiding | | Export | enableExport | -- |

See the full API Reference and Feature Documentation for details.

Types

All types are exported from the package entry point:

import type {
  Table,
  TableOptions,
  TableState,
  ColumnDef,
  Column,
  Row,
  Cell,
  Header,
  HeaderGroup,
  SortingState,
  ColumnFiltersState,
  PaginationState,
  RowSelectionState,
  EditingState,
  // ... and many more
} from '@zvndev/yable-core'

License

MIT