{"id":16295663,"url":"https://github.com/hamlim/better-beacon","last_synced_at":"2025-03-20T04:31:08.165Z","repository":{"id":216854674,"uuid":"742617151","full_name":"hamlim/better-beacon","owner":"hamlim","description":"A better version of navigator.sendBeacon!","archived":false,"fork":false,"pushed_at":"2024-02-17T22:10:31.000Z","size":73,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-16T12:20:03.819Z","etag":null,"topics":["navigator","sendbeacon"],"latest_commit_sha":null,"homepage":"https://matthamlin.me/2024/january/building-better-beacon","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hamlim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-01-12T22:01:09.000Z","updated_at":"2024-05-02T00:57:44.000Z","dependencies_parsed_at":"2024-01-15T23:13:32.010Z","dependency_job_id":"668e05f4-e727-4d91-8138-f0645007f0e8","html_url":"https://github.com/hamlim/better-beacon","commit_stats":null,"previous_names":["hamlim/better-beacon"],"tags_count":0,"template":false,"template_full_name":"hamlim/template-react-library","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamlim%2Fbetter-beacon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamlim%2Fbetter-beacon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamlim%2Fbetter-beacon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamlim%2Fbetter-beacon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hamlim","download_url":"https://codeload.github.com/hamlim/better-beacon/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244552278,"owners_count":20471044,"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":["navigator","sendbeacon"],"created_at":"2024-10-10T20:19:26.524Z","updated_at":"2025-03-20T04:31:07.482Z","avatar_url":"https://github.com/hamlim.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Better (send)Beacon\n\nA better version of `navigator.sendBeacon`, that doesn't break when you try to queue too many events!\u003csup\u003e\u003ca href=\"#whaaa\"\u003e1\u003c/a\u003e\u003c/sup\u003e\n\n## Installation:\n\n```sh\nbun add better-beacon\n```\n\n## Usage:\n\n```tsx\nimport BetterBeacon from \"better-beacon\";\n\nlet bbeacon = new BetterBeacon({\n  autoTransformJSON: true,\n});\n\n// Works just like `navigator.sendBeacon`!\nbbeacon.send(\"/path\", \"true\");\n\n// Automatically converts objects to Blobs under the hood\nbbeacon.send(\"/path\", { data: true });\n```\n\n## Context:\n\n\u003cdiv id=\"#whaaa\"\u003e\u003c/div\u003e\n\nYou might be wondering, why does this library exist? Well fortunately for you, I wrote up a short blog post about it available here: [Building Better Beacon](https://matthamlin.me/2024/january/building-better-beacon)\n\n## Contributing:\n\n### `build`\n\n```sh\nbun run build\n```\n\n### `test`\n\n```sh\nbun test\n```\n\n### Tools:\n\n- Typescript\n- SWC\n- Bun\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhamlim%2Fbetter-beacon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhamlim%2Fbetter-beacon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhamlim%2Fbetter-beacon/lists"}