{"_id":"streak-calc-math","name":"streak-calc-math","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"streak-calc-math","version":"1.0.0","description":"Dependency-free calendar-day bucketing and streak math primitives, with an optional Node-only on-disk store. Helper for streak-calc-math.","type":"module","license":"MIT","types":"./types/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./types/index.d.ts","default":"./dist/index.mjs"},"./store":{"types":"./types/store.d.ts","default":"./dist/store.mjs"},"./package.json":"./package.json"},"engines":{"node":">=18"},"keywords":["streak","calendar","day","analytics"],"_id":"streak-calc-math@1.0.0","_nodeVersion":"24.15.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-/4SmtMan0By9XgwjShrcYrqKDmvcP9Rl0tWNpL8kamszwyMnFFa8SBrp7MZSTVoSBfa1ZfMbhcPM5Da3M3Jv9A==","shasum":"41961eeade4856e7a27db8b7d1af68b65a9a7fcc","tarball":"https://registry.npmjs.org/streak-calc-math/-/streak-calc-math-1.0.0.tgz","fileCount":9,"unpackedSize":72132,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC7ZGB+nMk/dYE7XaM8RpynX1Dqk5Gg+R0KOaaVOCtragIgCV8xJeRNtXCI2lYMsVI4h0R25/9YQscO0akOxR/1yLU="}]},"_npmUser":{"name":"honorablemoons","email":"honorabl.emoon@proton.me"},"directories":{},"maintainers":[{"name":"honorablemoons","email":"honorabl.emoon@proton.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/streak-calc-math_1.0.0_1785892836415_0.6516785030391221"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-05T01:20:36.349Z","1.0.0":"2026-08-05T01:20:36.578Z","modified":"2026-08-05T01:20:36.804Z"},"maintainers":[{"name":"honorablemoons","email":"honorabl.emoon@proton.me"}],"description":"Dependency-free calendar-day bucketing and streak math primitives, with an optional Node-only on-disk store. Helper for streak-calc-math.","keywords":["streak","calendar","day","analytics"],"license":"MIT","readme":"# streak-calc-math\n\n## API\n\n```js\nimport { dayKey, addDays, dayDiff, bucketByDay, qualifyingDayKeys } from 'streak-calc-math';\nimport { store } from 'streak-calc-math/store'; // Node-only\n```\n\n- `dayKey(date, timeZone?)` → `\"YYYY-MM-DD\"`\n- `addDays(key, n)` → shifted day key\n- `dayDiff(aKey, bKey)` → whole-day difference\n- `bucketByDay(entries, timeZone?)` → `Map<dayKey, total>`\n- `qualifyingDayKeys(entries, goal, timeZone?)` → sorted day keys meeting the goal\n\n## Layout\n\nCompiled ES modules ship in `dist/`, type declarations in `types/` (wired up via\nthe `exports` map — import by the package name, not by path):\n\n```\ndist/\n  index.mjs              boot shim: re-exports the day-math + import-time self-check\n  internal/daymath.mjs   the pure primitives\n  store.mjs              Node-only on-disk memo store\ntypes/\n  index.d.ts\n  store.d.ts\n```\n\nImporting the package root (`streak-calc-math`) evaluates `dist/index.mjs`,\nwhich runs a tiny startup self-check. That boot happens transitively the first\ntime `svelte-mapping-metrics` pulls the helper in — there is **no** `postinstall`\nor other npm lifecycle script.\n","readmeFilename":"README.md","_rev":"1-d5621b8803411c7892c26b089787431c"}