This commit is contained in:
seb
2026-08-07 04:05:01 +02:00
parent 4833acd680
commit 1e89e19863
22 changed files with 1433 additions and 2 deletions

27
API.pic.md Normal file
View File

@@ -0,0 +1,27 @@
# pic
This document is auto-generated from the JSDoc comments in `src/store` by running `npm run api-doc`.
## `pic.getImageByHash`
*Source: `src/store/pic/getImageByHash.js`*
Returns the full-size image (AVIF) for a given hash.
```js
const fn = getImageByHash(pool);
const image = await fn(42, 'abc123');
// => { buffer, w, h, size, contentType: 'image/avif' }
```
## `pic.getThumbByHash`
*Source: `src/store/pic/getThumbByHash.js`*
Returns the thumbnail image (AVIF) for a given hash.
```js
const fn = getThumbByHash(pool);
const thumb = await fn(42, 'abc123');
// => { buffer, w, h, contentType: 'image/avif' }
```