Small, dependency-free pieces for single-file browser games and apps. Copy one file, get one fix.
<script src="save-kit.js"></script>orconst SaveKit = require('./save-kit.js')JS-modules is a set of 56 small browser libraries and tools, each solving one problem met while building LFC Foundry's apps: Apple Press, Fancy, the Banana, Pineapple Defense, Story Editor and Netflow Map.
require, call it.The modules are for developers; the apps built from them need no install and no special knowledge.
Single-file offline apps cannot load code from a server, so any library has to be copied into the file, and its size is part of every download. These modules are plain files with no build step and no dependencies. A module is kept only if it does something the nearest open-source option does not, or does it measurably better, and its README says where the other one wins.
Copy only what you need. No build step, no package tree.
Hot paths run in WebAssembly with SIMD, with plain JavaScript when wasm is missing.
The heavy modules hand memory back after big jobs, by a trim() call or an idle timer.
Firefox, Chromium and WebKitGTK. Every release names the versions it ran in.
AGENTS.md, llms.txt and modules.json describe every piece for people and assistants.
lfc-pack files are read by Python and Go as well as the browser, so data packed in a page is not locked in.
save-kit-lite keeps checked fields and a backup slot in 966 bytes minified and gzipped, for small games.
zip-open opens Excel files over 16 MB on the page 3 to 24% faster (cloud Firefox, Chromium, WebKitGTK), with the same results.
Every number names the browser and machine it ran on, and slower cases are stated.
Save a game safely in three lines.
<!-- copy modules/save-kit/save-kit.js next to your page --> <script src="save-kit.js"></script> <script> var kit = SaveKit.create({ key: 'mygame', schema: { score: 'num' } }); </script>
lfc-pack 0.4.0 against Parquet on 260 MB of real FHIR records (140,468 rows). Measured 2026.10.31 in the cloud test browsers (Chromium 153, Firefox 158, WebKitGTK 2.52.6) on a shared 4-core machine; medians. Parquet was written natively by pyarrow 26 after a DuckDB 2.0 read of the same JSON (zstd level 3, 4 threads).
| Measure | Parquet | lfc-pack |
|---|---|---|
| Pack time, one thread | 7.44 s | 2.13 to 2.69 s |
| Pack time, 4 helpers | 7.44 s | 1.08 to 1.56 s |
| File size | 18.74 MB | 8.32 MB |
2.8 to 3.5 times Parquet's speed on one thread and 4.8 to 6.9 times with 4 helpers, at 44% of its size. Since this run, 0.4.4 packs FHIR 10 to 15% faster, and 0.4.6 makes the same file 7.30 MB, 39% of Parquet's size. Since 0.4.13 the library file itself is 353 KB instead of 789 KB, and 0.4.15 packs event tables 14 to 25% faster and logs 10 to 16% faster on a laptop (Firefox 160, Chromium 156), with byte-identical files.
Measured against the common alternative. Each chart says where it ran; both come from the module pages.
Times faster than the named alternative, one dot per comparison (log scale; the line is level, right is ahead).
Source and notes: each dot is the headline figure from that module's page, the lowest end where it is a range; laptop runs where we have them, otherwise the three cloud browsers. One compares against a plain loop, not a rival library. The netflow-layers dot is speed only; its page has the crossings comparison. The ones behind are on their module pages with the reasons.
Size of 300,000 network links, megabytes. Lower is better.
Source and notes: Fast mode, restored exactly, measured on version 2.0.1 (sizes are exact byte counts). About 2.5 times smaller than msgpackr, and it unpacks as fast or faster in Chromium 155, Firefox 158, WebKitGTK 2.52.6. It loses on download size: since 2.12.0 the minified full file is 83.1 KB gzipped and the read-only file 37.1 KB, against 11 KB for msgpackr.
Time to read 200,000 CSV rows, milliseconds. Lower is better.
Source and notes: Laptop, Firefox 160, 16 cores, text-columns 0.5.0, 2026.10.30; 6 columns, 7.9 MB. Papa Parse with typed rows takes 3.2 times as long here and 7 to 12 times as long in the cloud test browsers (Firefox 158, Chromium 155, WebKitGTK 2.52.6).
Library file size, kilobytes, version 0.4.13 against 0.4.12. Lower is better.
Source and notes: The built-in WebAssembly programs are stored compressed and the browser unpacks them while it compiles them. Results are the same, and load to first result takes 3 to 11% less time (cloud test browsers, lfc-pack changelog).
Time to build the whole 1,500-item chart, milliseconds. Lower is better.
Source and notes: netflow-sankey 2.7.0 against d3-sankey 0.12.3, same random data (1,500 items, 2,331 links), cloud test browsers (Chromium 155, Firefox 158, WebKitGTK 2.52.6), median of 3 runs, re-measured 2026.11.05. In Chromium the runs overlap, so it is a tie. d3-sankey is faster on small charts with default settings (100 items: 8 ms against 3.6 ms).
Link crossings in the finished picture. Fewer is better.
Source and notes: same random 1,500-item, 2,331-link data and versions as above, cloud test browsers. Only 256 band pieces pass over a bar they do not belong to, against 1,916 for d3-sankey, and loops are drawn instead of refused.
Link crossings as drawn; fewer is better.
Source and notes: Random map of 1,000 items and 1,900 links, Chromium 155; the same counts in Firefox and WebKitGTK. netflow-layers takes 129 ms, ELK 2.1 s and dagre 8.4 s. At 400 items the three are level.
Screenshots from the Netflow Map app, taken in the app with nothing touched up: its 16 map views and 22 charts. The drawing code is in these modules, so you can use the same views in your own page: netflow-engine, netflow-hierarchy (Treemap, Sunburst, Icicle, Circle pack, Tree), netflow-circular (Chord, Bundles), netflow-plot (plain charts), netflow-sankey and netflow-layers. Click a picture to see it full size.
Data with a start and an end: a choose-your-path story, a team's work queue and a supply chain from suppliers to markets.






Data without a story: a company's 288 services and the calls between them, and the story again as an arc and a grid.





Anything with parents and children: here a bulleted trip-planning outline. The nesting comes from the links, the groups or a parent column.





22 plain charts from any table's columns, drawn with the same engine as the map. Shown here on a sample of 400 stores with region, team, month, revenue, cost, users, rating and a one-word note. Every chart picks sensible columns on its own, names its colors in a key and saves as SVG.






















Taken in Chromium, dark theme, Netflow Map build 2026.11.05.0228. The chart pictures use a made-up sample table of 400 stores.
A small selection. The full list of 56 is in the repository README.