{"id":21561749,"url":"https://github.com/synonymdev/slashtags-profile","last_synced_at":"2025-07-16T16:31:04.344Z","repository":{"id":192555977,"uuid":"627835842","full_name":"synonymdev/slashtags-profile","owner":"synonymdev","description":"Slashtags Profiles library","archived":true,"fork":false,"pushed_at":"2023-10-06T03:44:43.000Z","size":34,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-18T13:02:03.036Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/synonymdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-14T09:58:31.000Z","updated_at":"2024-06-07T12:26:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"7152b565-2ad9-4341-95d2-fc940ab08e7a","html_url":"https://github.com/synonymdev/slashtags-profile","commit_stats":null,"previous_names":["synonymdev/slashtags-profile"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/synonymdev/slashtags-profile","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synonymdev%2Fslashtags-profile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synonymdev%2Fslashtags-profile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synonymdev%2Fslashtags-profile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synonymdev%2Fslashtags-profile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/synonymdev","download_url":"https://codeload.github.com/synonymdev/slashtags-profile/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synonymdev%2Fslashtags-profile/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265524624,"owners_count":23782013,"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":[],"created_at":"2024-11-24T09:27:52.765Z","updated_at":"2025-07-16T16:31:03.641Z","avatar_url":"https://github.com/synonymdev.png","language":"JavaScript","readme":"# slashtags-profile\n\nSlashtags Profile helper module.\n\n## Install\n\n```bash\nnpm install @synonymdev/slashtags-profile\n```\n\n## Usage\n\nInitialize\n\n```js\nconst { Client } = require('@synonymdev/web-relay')\nconst SlashtagsProfile = require('@synonymdev/slashtags-profile')\n\nconst client = new Client({ storage: \"path/to/storage\", relay: address })\nconst writer = new SlashtagsProfile(client)\n\nconst profile = { name: 'foo' }\n\nawait writer.put(profile)\n\nconst url = await writer.createURL()\n```\n\nResolve profile as a reader \n\n```js\nconst { Client } = require('@synonymdev/web-relay')\nconst SlashtagsProfile = require('@synonymdev/slashtags-profile')\n\nconst client = new Client({ storage: \"path/to/storage \"})\nconst reader = new SlashtagsProfile(client)\n\nconst resolved = await reader.get(url) // URL from writer side\n// {name: 'foo'}\n```\n\n## API\n\n#### `const profile = new SlashtagsProfile(WebRelayClient)`\n\nCreate a new SlashtagsProfile instance.\n\n- `WebRelayClient` [slashtags-web-relay](https://github.com/slashtags/web-relay) instance.\n\n#### `const url = await profile.createURL()`\n\nCreates a sharable `url` to allow remote readers to read this profile.\n\n#### `await profile.close()`\n\nCloses the underlying web relay client.\n\n#### `await profile.put(profile)`\n\nPuts a new profile value. `profile` param should be an object following its type definition.\n\n#### `await profile.del()`\n\nDeletes the value from the underlying hyperdrive.\n\n####  `await profile.get([url])`\n\nRead a local profile if no `url` is passed, or a remote one if `url` is passed.\n\n#### `await profile.subscribe(url, onupdate)`\n\nWatch updates to a remote file, and call `onupdate(profile)` function with current profile.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynonymdev%2Fslashtags-profile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsynonymdev%2Fslashtags-profile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynonymdev%2Fslashtags-profile/lists"}