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

@inandu-solutions/grid-core

v0.1.6

Published

Framework-agnostic core of the Inandu data grid: sorting, filtering, parsing, formatting, aggregates, tree flattening, CSV/Excel/PDF export helpers and i18n messages. The shared engine behind @inandu-solutions/grid-angular, grid-react and grid-vue.

Readme

@inandu-solutions/grid-core

The framework-agnostic core of the Inandu data grid: the sorting, filtering, parsing, formatting, aggregation, tree-flattening, export helpers and translated messages that @inandu-solutions/grid-angular, @inandu-solutions/grid-react and @inandu-solutions/grid-vue share.

One core, three interfaces. A fix to filtering, dates, parsing or export is made once and reaches the three grids together; the grids keep only their UI layer, and the query contract they speak with the .NET server is checked against one shared fixture. The architecture page says what lives in each layer.

Pure TypeScript, no framework, no DOM except in downloadBlob. If you use one of the grids above you already get this package; install it directly only to build your own grid or to reuse the helpers.

npm install @inandu-solutions/grid-core

What is inside

| Area | Exports | | --- | --- | | Types | InanduColumnType, InanduGridRow, InanduGridColumnFilterValue, ColumnConfig, ... | | Formatting | formatCellValue, formatDateValue, coerceToDate, defaultNumberFormatter | | Filtering | matchesColumnFilter, hasMeaningfulFilterValue | | Sorting | compareCellValues | | Trees | flattenTree, collectTreeRows | | Aggregates | computeGroupAggregates, AGGREGATE_SYMBOLS | | Parsing | parseDraftValue, parsePastedCellValue, parsePastedCell | | Export helpers | escapeCsvValue, neutralizeCsvFormula, escapeMarkup, truncatePdfText, downloadBlob | | Saved state | readSavedGridState, writeSavedGridState, clearSavedGridState, sanitizeGridState | | Delete confirmation | createDeleteConfirmation | | Server replies | parseServerResponse | | i18n | en, es, fr, it, zh, INANDU_GRID_TRANSLATIONS |

import { compareCellValues, escapeCsvValue, formatCellValue, matchesColumnFilter } from '@inandu-solutions/grid-core';

formatCellValue(1234.5, 'number', '1.0-2', 'en-US'); // "1,234.50"
formatCellValue('2024-01-05', 'date', 'YYYY-MM-DD', 'en-US'); // "2024-01-05", in every time zone
escapeCsvValue('=HYPERLINK("http://example.com","x")'); // a quote is prefixed, so a spreadsheet opens it as text

Behaviours worth knowing

  • Dates are calendar dates. A bare yyyy-mm-dd (a type="date" value) is local midnight of that day, so it formats, filters and compares as that day west and east of UTC alike. A date range filter includes the whole of its to day.
  • CSV cells are neutralized. escapeCsvValue prefixes a cell that starts with =, +, -, @, a tab or a carriage return with a single quote, so a spreadsheet does not run it as a formula; plain numbers such as -5 are left alone. Pass { neutralizeFormulas: false } if the file is never opened in a spreadsheet.
  • Excel markup drops what XML cannot carry. escapeMarkup removes C0 control characters (except tab, LF and CR), which would otherwise make Excel reject the whole file.
  • PDF export and non-Latin text. jsPDF's built-in fonts have no CJK glyphs; the grids' PDF export renders Chinese, Japanese or Korean text as garbage unless you embed a font that has them.
  • Pasting. parsePastedCell returns undefined for text a column cannot hold (a blank or invalid number or date), so a paste never clears a cell by accident.
  • Trees tolerate cycles. flattenTree and collectTreeRows terminate on data where a node is its own descendant.

Development

npm install
npm run typecheck   # tsc --noEmit
npm test            # vitest run (jsdom)
npm run build       # dist/ (ES + CJS + types)

The date tests change TZ themselves; CI also runs the whole suite once in America/Bogota.

License

MIT, Inandu SAS.