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

@idea1/filekit

v1.0.0

Published

Messy-file reader/writer toolkit (CSV + XLSX) for the close kit and similar agent-driven data pipelines. Pure Node, no dependencies.

Downloads

177

Readme

@datafabriq/filekit

A reader and writer for the spreadsheets agent-driven data pipelines depend on — CSV and XLSX files a client uploads that a downstream process has to parse correctly every time. Pure Node (fs + zlib), no dependencies, no build step.

const fk = require('@datafabriq/filekit');

fk.parseCsv(text, { headerRow })   // quoted fields, comma-thousands; headerRow skips a preamble
fk.readXlsx(pathOrBuffer)          // reads .xlsx directly — the unzip is built in
fk.writeXlsx(path, sheets)         // one tab per dataset; row 0 is the header

fk.num(v)                          // '$1,234.50' → 1234.5; '(312,571.01)' → -312571.01
fk.excelSerialToYM(n)              // 46143 → '2026-05'
fk.findMonthColumns(header)        // discover a MON YYYY matrix by header, never by index
fk.findColumnBySerialMonth(sheet, headerRow, '2026-05')
fk.findRow(sheet, (row, n) => …)   // locate a block by its label

readXlsx returns real sheet names in workbook order; address a sheet by name (wb.sheet('GL 24500 Accrued Bonus')) rather than by index. Cells are 1-based and Excel-shaped: sheet.at(12, 3) is cell C12.

Reading messy source files

Two properties of these files break naive parsers, and both are covered by the tests:

  • Month columns move. A commission ledger's MON YYYY matrix grows a column each period, and a bonus workbook's month headers are Excel serial dates. Locate the close month by matching the header; a fixed column index silently reads the wrong month.
  • A cell's value is not always its text. Totals are formula cells whose value lives in <v>; empty cells are self-closing and carry no value at all; text may be a shared string or an inline string. filekit resolves all four.

Locate a block by the labels around it (Beginning, New Accruals, Payments, Ending, the GL numbers, etc.) rather than by row number, so an inserted row does not shift the read.

Writing a reference workbook

writeXlsx produces workbooks a Custom Files connector can ingest — one tab per dataset, snake_case headers on row 1, and conventions bronze expects:

  • Dates as literal YYYY-MM-DD text, never Excel serials, so TRY_CAST(… AS DATE) holds.
  • An omitted cell for a null; an empty cell ingests as NULL, 0 does not.
  • Values written as numbers, text as inline strings, XML-escaped.
  • Every column ingests as STRING; the reading spec does the TRY_CAST.

Tests

npm test

Self-contained — every fixture is built in-process, so the suite carries no customer data and runs anywhere. It asserts the cell shapes above: formula cells, self-closing cells, shared strings with entities, serial dates, a header below a nine-row preamble, and a write→read round-trip preserving nulls, negatives, and escaping.

Origin

Extracted from Concept3D's month-end close kit (datafabriq-opscontext/revenue-reporting/close-tools/), where the same reader already served two teams' file shapes (Concept3D's QuotaPath/bonus files, Intake's Amazon/Ed's-workbook files) before this package existed.

Publishing

Published as @idea1/filekit (public), same npm org as @idea1/cli. Pushing a filekit-v*.*.* tag runs .github/workflows/publish-filekit.yml, which runs npm run build (the test suite) then npm run deploy (npm publish --access public), authenticated via the NPM_TOKEN repo secret — an npm Automation token for a member of the idea1 npm org. Bump the version in package.json first, since npm rejects re-publishing an existing version.