{"id":30420712,"url":"https://github.com/skybrud/sky-window","last_synced_at":"2025-08-22T08:19:57.703Z","repository":{"id":57362525,"uuid":"85165587","full_name":"skybrud/sky-window","owner":"skybrud","description":"Lightweight module for standard use of rxJs observables","archived":false,"fork":false,"pushed_at":"2018-02-28T07:49:09.000Z","size":58,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-07-25T02:04:43.692Z","etag":null,"topics":[],"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/skybrud.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}},"created_at":"2017-03-16T07:27:05.000Z","updated_at":"2017-03-16T07:41:24.000Z","dependencies_parsed_at":"2022-09-26T16:32:10.918Z","dependency_job_id":null,"html_url":"https://github.com/skybrud/sky-window","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/skybrud/sky-window","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skybrud%2Fsky-window","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skybrud%2Fsky-window/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skybrud%2Fsky-window/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skybrud%2Fsky-window/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skybrud","download_url":"https://codeload.github.com/skybrud/sky-window/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skybrud%2Fsky-window/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271606604,"owners_count":24788981,"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-08-22T02:00:08.480Z","response_time":65,"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":[],"created_at":"2025-08-22T08:19:57.593Z","updated_at":"2025-08-22T08:19:57.694Z","avatar_url":"https://github.com/skybrud.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sky-window\n\u003e Simple js lightweight module for window events based on RxJs - handles resize and scroll events.\n\n## Dependencies\n- [RxJs](https://github.com/ReactiveX/rxjs)\n\n## Usage\n1. Install RxJs\n2. Import sky-window\n``` js\nSkyWindow.resize.subscribe(() =\u003e {\n    // On resize do what I type here\n});\n\nSkyWindow.scroll.subscribe(() =\u003e {\n    // On scroll do what I type here\n});\n```\n\n## How it works\nSky-window uses hot observbles by invoking `.share` which is the same as `.publish().refCount()`. This means that when at least one instance is listening til e.g. resize it will run, but if refcount is 0 it will automaticly be unsubscribed. In addition resize will only fire 100ms after the last resize event.\n\n``` js\nresize: Observable.fromEvent(window, 'resize').share().debounce(() =\u003e Observable.timer(100)),\nscroll: Observable.fromEvent(window, 'scroll').share(),\n```\n\n# Credits\nThis module is made by the Frontenders at [skybrud.dk](http://www.skybrud.dk/). Feel free to use it in any way you want. Feedback, questions and bugreports should be posted as issues. Pull-requests appreciated!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskybrud%2Fsky-window","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskybrud%2Fsky-window","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskybrud%2Fsky-window/lists"}