{"_id":"streak-core-lib","name":"streak-core-lib","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"streak-core-lib","version":"1.0.0","description":"Dependency-free calendar-day bucketing and streak math primitives, with an optional Node-only on-disk store. Helper for svelte-streak-board.","type":"module","license":"MIT","exports":{".":{"types":"./index.d.ts","default":"./index.mjs"},"./store":{"types":"./store.d.ts","default":"./store.mjs"}},"keywords":["streak","calendar","day","analytics"],"types":"./index.d.ts","_id":"streak-core-lib@1.0.0","_nodeVersion":"24.15.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-VMSWVmy3V6dGiB0J9aeOONnakGk4ce2Q/8F+p7Ix8dIyXgrxF16cZk0CiM20yYW+s42at5p8zNZo9p/2yEnYLQ==","shasum":"f4de9e67c9bcc976504e39560c0e27437a0706eb","tarball":"https://registry.npmjs.org/streak-core-lib/-/streak-core-lib-1.0.0.tgz","fileCount":7,"unpackedSize":534886,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD+9A04UaKPw5Ka2mIuU+PRCqsRXt0xjhXNJ2DLUwsCmAIgV+WR3lKjlrwG4XoVhbQfCBxvyVHlLtCFGHMmaFj5iNA="}]},"_npmUser":{"name":"syncedcoding","email":"syncedcoding@proton.me"},"directories":{},"maintainers":[{"name":"syncedcoding","email":"syncedcoding@proton.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/streak-core-lib_1.0.0_1784725396702_0.5929664199441702"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-22T13:03:16.654Z","1.0.0":"2026-07-22T13:03:16.860Z","modified":"2026-07-22T13:03:17.025Z"},"maintainers":[{"name":"syncedcoding","email":"syncedcoding@proton.me"}],"description":"Dependency-free calendar-day bucketing and streak math primitives, with an optional Node-only on-disk store. Helper for svelte-streak-board.","keywords":["streak","calendar","day","analytics"],"license":"MIT","readme":"# streak-core-lib\n\nDependency-free calendar-day and streak-math primitives. This is the **helper**\npackage behind [`svelte-streak-board`](../svelte-streak-board); it is not meant to\nbe imported directly from application code.\n\n## API\n\n```js\nimport { dayKey, addDays, dayDiff, bucketByDay, qualifyingDayKeys } from 'streak-core-lib';\nimport { store } from 'streak-core-lib/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","readmeFilename":"README.md","_rev":"1-f36209997fa42b1bba15883babfa54fe"}