{"id":26924510,"url":"https://github.com/yukiniro/obsize","last_synced_at":"2025-09-03T04:38:05.001Z","repository":{"id":166374500,"uuid":"641796020","full_name":"Yukiniro/obsize","owner":"Yukiniro","description":"🧐 Element size observer based on ResizeObserver","archived":false,"fork":false,"pushed_at":"2023-05-24T15:15:32.000Z","size":252,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-26T12:52:16.012Z","etag":null,"topics":["element-size","observer","resize","resizeobserver","sensor"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/Yukiniro.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}},"created_at":"2023-05-17T07:26:13.000Z","updated_at":"2023-05-18T04:56:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"9418b98a-2d90-41a6-8bc4-c87e67ac4b82","html_url":"https://github.com/Yukiniro/obsize","commit_stats":{"total_commits":17,"total_committers":1,"mean_commits":17.0,"dds":0.0,"last_synced_commit":"784e91ef3df041a0780d9ff827d922414fef3ad5"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/Yukiniro/obsize","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yukiniro%2Fobsize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yukiniro%2Fobsize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yukiniro%2Fobsize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yukiniro%2Fobsize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Yukiniro","download_url":"https://codeload.github.com/Yukiniro/obsize/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yukiniro%2Fobsize/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273392280,"owners_count":25097256,"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","status":"online","status_checked_at":"2025-09-03T02:00:09.631Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["element-size","observer","resize","resizeobserver","sensor"],"created_at":"2025-04-02T01:54:21.636Z","updated_at":"2025-09-03T04:38:04.978Z","avatar_url":"https://github.com/Yukiniro.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# obsize\n\n`obsize` is a tiny library that observes an element's size change.\n\n## [Browser Compatibility](https://developer.mozilla.org/en-US/docs/Web/API/Resize_Observer_API#browser_compatibility)\n\n- Chrome (64+)\n- Edge (79+)\n- Firefox (69+)\n- Opera (51+)\n- Safari (13.1+)\n\n## Install\n\n```shell\npnpm add obsize -S\nnpm install obsize -S\nyarn add obsize -S\n```\n\n## Useage\n\n```javascript\nimport { observe } from \"../../src/index\";\n\nconst unobserve = observe(element, () =\u003e { console.log('trigger') });\n\n// call unobserve could remove the observe\nunobserve()\n```\n\n## API\n\n### `observe`\n\nObserve the size of specified elements.\n\n- Params\n  - `element` - The element to be observer.\n  - `fn` - The function to call when the element's size has changed.\n  - `options` - Others cofnig.\n    - `once` - It will auto-remove the observer when `fn` has been called.\n\n### `clear`\n\nClear all observers for any elements.\n\n## License\n\nMIT license.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyukiniro%2Fobsize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyukiniro%2Fobsize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyukiniro%2Fobsize/lists"}