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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@liji-table/core

v0.0.2

Published

A **framework-agnostic, high-performance table engine** that powers the Liji Table ecosystem. It provides all advanced table logic — sorting, filtering, pagination, column resizing, selection, pinning, export, and state management — without depending o

Downloads

225

Readme

@liji-table/core

A framework-agnostic, high-performance table engine that powers the Liji Table ecosystem.
It provides all advanced table logic — sorting, filtering, pagination, column resizing, selection, pinning, export, and state management — without depending on any UI framework.

Pure logic. Zero UI. Maximum control.


📌 Why @liji-table/core?

Most table libraries tightly couple UI + logic, making them:

  • Hard to customize
  • Hard to optimize
  • Framework-locked

@liji-table/core solves this by acting as a headless table engine that can be used with:

  • React
  • Angular
  • Vue
  • Svelte
  • Vanilla JS
  • Custom renderers

🧱 Architecture Overview

Your UI (Any Framework) ↓ @liji-table/core

  • No DOM assumptions
  • No CSS dependencies
  • No framework imports
  • Works purely with data & state

Framework bindings (like @liji-table/react) are thin wrappers around this core.


✨ Key Features Explained

⚙️ Headless Core Engine

  • No rendering
  • No HTML
  • No styles
  • Only data processing & state

🔄 Sorting

  • Ascending / Descending / None
  • Natural sort (numeric + text)
  • Column-level sortable control

🔍 Filtering & Search

  • Global search across all fields
  • Column-level filters
  • Case-insensitive matching

📄 Pagination

  • Page index & page size control
  • Automatic page calculations
  • Safe boundary handling

↔️ Column Width Management

  • Manual width setting
  • Smart auto-resize using canvas measurement
  • Font-aware sizing

🧩 Column Reordering

  • Reorder columns by index
  • Preserves pinned column rules

🧲 Column Pinning

  • Pin columns to left or right
  • Automatic column reordering
  • Ideal for IDs, actions, or checkboxes

✅ Row Selection

  • Toggle individual row selection
  • Select / unselect all rows on current page
  • Page-aware selection logic

📤 Export

  • Export filtered & sorted data
  • CSV generation without dependencies
  • Visible-column–aware export

📦 Installation

npm install @liji-table/core

🚀 Basic Usage (Framework Agnostic)

import { UniversalTableCore } from "@liji-table/core";

const data = [
  { id: 1, name: "Alice", sales: 1200 },
  { id: 2, name: "Bob", sales: 900 }
];

const columns = [
  { id: "name", label: "Name", sortable: true },
  { id: "sales", label: "Sales", sortable: true }
];

const table = new UniversalTableCore(data, columns);

// Subscribe to state changes
const unsubscribe = table.subscribe(state => {
  console.log("Table state updated:", state);
});

// Actions
table.setSearch("alice");
table.toggleSort("sales");
table.setPageSize(5);

// Get processed rows
const rows = table.getRows();

🧠 Core State & Data

TableState

| Property | Description | |--------|------------| | pageIndex | Current page index | | pageSize | Rows per page | | searchQuery | Global search query | | filters | Column-level filters | | sortColumn | Active sort column | | sortDirection | asc / desc / null | | columnWidths | Column width map | | columns | Column definitions | | selectedIds | Selected row IDs |