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 shelf of small browser libraries cut out of two shipped games. Each module is one file with no dependencies. Add it with a script tag or require, call it, and read its folder README for limits. Every folder also has a demo page that opens straight from disk.
The pieces are for more seasoned users and developers. The apps and games built from them need no install, no administrative privileges and no special computing knowledge.
Only parts not already covered by open source were kept. These are the small fixes learned by shipping real games to phones and desktops: a hold that dies on pointercancel, a save overwritten by a NaN, a curtain stuck out of place on Android. Each module README names the closest existing project and says how this one differs.
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.
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.
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 against Parquet on 260 MB of real FHIR records, Firefox and Chromium.
| Measure | Parquet | lfc-pack |
|---|---|---|
| Pack time | 6.1 s | 2.05 s |
| File size | 17.14 MB | 7.03 MB |
Measured in the test browsers against the common alternative. Both charts come from the module READMEs.
Fast mode, restored exactly. About 2.5 times smaller than msgpackr, and it unpacks as fast or faster in all four browsers. Chromium, Firefox, WebKitGTK and GNOME Web. It loses on download size: 84.6 KB gzipped against 11 KB for msgpackr.
A small selection. The full list of 49 is in the repository README.