{"id":19896810,"url":"https://github.com/achou11/ssb-blobs-blurhash","last_synced_at":"2025-03-01T06:19:20.664Z","repository":{"id":53880674,"uuid":"521713775","full_name":"achou11/ssb-blobs-blurhash","owner":"achou11","description":"SSB secret stack plugin to generate a blurhash hash for a provided blob","archived":false,"fork":false,"pushed_at":"2022-08-10T14:02:35.000Z","size":197,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-11T23:56:32.393Z","etag":null,"topics":["blobs","blurhash","secret-stack","ssb"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/achou11.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-05T16:54:00.000Z","updated_at":"2023-08-05T22:39:58.000Z","dependencies_parsed_at":"2022-08-13T03:11:06.122Z","dependency_job_id":null,"html_url":"https://github.com/achou11/ssb-blobs-blurhash","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/achou11%2Fssb-blobs-blurhash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/achou11%2Fssb-blobs-blurhash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/achou11%2Fssb-blobs-blurhash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/achou11%2Fssb-blobs-blurhash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/achou11","download_url":"https://codeload.github.com/achou11/ssb-blobs-blurhash/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241324583,"owners_count":19944196,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blobs","blurhash","secret-stack","ssb"],"created_at":"2024-11-12T18:40:36.890Z","updated_at":"2025-03-01T06:19:20.646Z","avatar_url":"https://github.com/achou11.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ssb-blobs-blurhash\n\n\u003e SSB secret stack plugin to generate a blurhash hash for a provided blob\n\n## Install\n\n`npm install ssb-blobs-blurhash`\n\n## Usage\n\n- Requires **Node 12** or higher\n- Requires `ssb-blobs`\n\n```diff\n SecretStack({appKey: require('ssb-caps').shs})\n+  .use(require('ssb-blobs'))\n+  .use(require('ssb-blobs-blurhash'))\n   .call(null, config)\n```\n\n## API\n\n### `ssb.blobsBlurhash.generate(blobId, opts, cb) (muxrpc \"async\")`\n\n- `blobId: string`: ssb blob id\n- `opts: { width: number, details }`: options to use for generation.\n  - `width` is the pixel width to resize your blob image to, for generating the hash. The smaller this number is, the quicker the algorithm will run, but with lower quality. The higher this number is, the higher the quality and the slower the algorithm will run.\n  - `details` is a boolean that determines whether to return the hash (if `false`) or an object `{hash, componentX, componentY}` (if `true`)\n- `cb: (err: any, hash: string) =\u003e void`: callback that provides the hash generated by [blurhash](https://github.com/woltapp/blurhash)\n\n```js\nssb.blobsBlurHash.generate('abc123', { width: 48 }, (err, hash) =\u003e {\n    if (err) throw err\n\n    console.log(`Blurhash result is ${hash}`)\n})\n```\n\n## License\n\nMIT\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fachou11%2Fssb-blobs-blurhash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fachou11%2Fssb-blobs-blurhash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fachou11%2Fssb-blobs-blurhash/lists"}