{"id":15217926,"url":"https://github.com/buschtoens/ember-runloop-decorators","last_synced_at":"2026-03-15T02:36:53.129Z","repository":{"id":57224266,"uuid":"409898564","full_name":"buschtoens/ember-runloop-decorators","owner":"buschtoens","description":"Decorators for `@ember/runloop`.","archived":false,"fork":false,"pushed_at":"2023-12-15T02:30:46.000Z","size":479,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-16T23:56:15.539Z","etag":null,"topics":["backburner","ember","ember-addon","ember-runloop","emberjs","runloop"],"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/buschtoens.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","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":"2021-09-24T08:59:32.000Z","updated_at":"2025-08-20T13:25:53.000Z","dependencies_parsed_at":"2024-11-16T17:33:50.264Z","dependency_job_id":"42d2b6ee-810b-4780-8c07-f855b769dc8a","html_url":"https://github.com/buschtoens/ember-runloop-decorators","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/buschtoens/ember-runloop-decorators","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buschtoens%2Fember-runloop-decorators","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buschtoens%2Fember-runloop-decorators/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buschtoens%2Fember-runloop-decorators/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buschtoens%2Fember-runloop-decorators/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/buschtoens","download_url":"https://codeload.github.com/buschtoens/ember-runloop-decorators/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buschtoens%2Fember-runloop-decorators/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28017040,"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-12-25T02:00:05.988Z","response_time":58,"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":["backburner","ember","ember-addon","ember-runloop","emberjs","runloop"],"created_at":"2024-09-28T12:08:07.641Z","updated_at":"2025-12-25T02:06:29.776Z","avatar_url":"https://github.com/buschtoens.png","language":"TypeScript","readme":"# ember-runloop-decorators\n\n[![CI](https://github.com/buschtoens/ember-runloop-decorators/workflows/CI/badge.svg)](https://github.com/buschtoens/ember-runloop-decorators/actions)\n[![npm version](https://badge.fury.io/js/ember-runloop-decorators.svg)](http://badge.fury.io/js/ember-runloop-decorators)\n[![Download Total](https://img.shields.io/npm/dt/ember-runloop-decorators.svg)](http://badge.fury.io/js/ember-runloop-decorators)\n[![Ember Observer Score](https://emberobserver.com/badges/ember-runloop-decorators.svg)](https://emberobserver.com/addons/ember-runloop-decorators)\n[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)\n[![dependencies](https://img.shields.io/david/buschtoens/ember-runloop-decorators.svg)](https://david-dm.org/buschtoens/ember-runloop-decorators)\n[![devDependencies](https://img.shields.io/david/dev/buschtoens/ember-runloop-decorators.svg)](https://david-dm.org/buschtoens/ember-runloop-decorators)\n\nDecorators for [`@ember/runloop`][ember-runloop].\n\n[ember-runloop]: https://api.emberjs.com/ember/release/classes/@ember%2Frunloop\n\n## Installation\n\n```sh\nember install ember-runloop-decorators\n```\n\n## Usage\n\n- [`@inRunLoop`](#inRunLoop)\n- [`@joinRunLoop`](#joinRunLoop)\n- [`@bind`](#bind)\n- [`@schedule`](#schedule)\n- [`@scheduleOnce`](#scheduleOnce)\n- [`@once`](#once)\n- [`@later`](#later)\n- [`@next`](#next)\n- [`@debounce`](#debounce)\n- [`@throttle`](#throttle)\n\n### `@inRunLoop`\n\n```ts\nclass Foo {\n  @inRunLoop\n  runInRunLoop() {\n    // If no run-loop is present, it creates a new one. If a run loop is\n    // present, it will queue itself to run on the existing run-loop's\n    // `actions` queue.\n  }\n}\n```\n\n### `@joinRunLoop`\n\n```ts\nclass Foo {\n  @joinRunLoop\n  runInRunLoop() {\n    // If no run-loop is present, it creates a new one. If a run loop is\n    // present, it will queue itself to run on the existing run-loop's\n    // `actions` queue.\n  }\n}\n```\n\n### `@bind`\n\n```ts\nclass Foo {\n  @bind\n  onActionsQueue() {\n    // This will be executed in the `actions` queue.\n  }\n *\n  @bind('sync')\n  onActionsQueue() {\n    // This will be executed in the `sync` queue.\n  }\n}\n```\n\n### `@schedule`\n\n```ts\nclass Foo {\n  @schedule\n  onActionsQueue() {\n    // This will be executed in the `actions` queue.\n  }\n *\n  @schedule('sync')\n  onActionsQueue() {\n    // This will be executed in the `sync` queue.\n  }\n}\n```\n\n### `@scheduleOnce`\n\n```ts\nclass Foo {\n  @schedule\n  onActionsQueue() {\n    // This will be executed in the `actions` queue.\n  }\n *\n  @schedule('sync')\n  onActionsQueue() {\n    // This will be executed in the `sync` queue.\n  }\n}\n```\n\n### `@once`\n\n```ts\nclass Foo {\n  @once\n  onceInCurrentRunLoop() {\n    // If no run-loop is present, it creates a new one. If a run loop is\n    // present, it will queue itself to run on the existing run-loop's\n    // `actions` queue.\n  }\n}\n```\n\n### `@later`\n\n```ts\nclass Foo {\n  @later(100)\n  after100ms() {\n    // Delay calling the method until the wait period has elapsed.\n    // Additional calls enqueue additional executions.\n  }\n}\n```\n\n### `@next`\n\n```ts\nclass Foo {\n  @next\n  inRunLoop() {\n    // If no run-loop is present, it creates a new one. If a run loop is\n    // present, it will queue itself to run on the existing run-loops action\n    // queue.\n  }\n}\n```\n\n### `@debounce`\n\n```ts\nclass Foo {\n  @debounce(100)\n  after100ms() {\n    // Delay calling the method until the debounce period has elapsed with\n    // no additional calls. If called again before the specified time has\n    // elapsed, the timer is reset and the entire period must pass again\n    // before the method is called.\n  }\n *\n  @debounce(100, true)\n  immediatelyAndAfter100ms() {\n    // Run the method immediately, but debounce other calls for this method\n    // until the wait time has elapsed. If called again before the specified\n    // time has elapsed, the timer is reset and the entire period must pass\n    // again before the method can be called again.\n  }\n}\n```\n\n### `@throttle`\n\n```ts\nclass Foo {\n  @throttle(100)\n  every100ms() {\n    // Ensure that the method is never called more frequently than the\n    // specified spacing period. The method is called immediately.\n  }\n *\n  @debounce(100, false)\n  delayedByAndEvery100ms() {\n    // Ensure that the method is never called more frequently than the\n    // specified spacing period. The method is called after the first spacing\n    // period has elapsed.\n  }\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuschtoens%2Fember-runloop-decorators","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbuschtoens%2Fember-runloop-decorators","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuschtoens%2Fember-runloop-decorators/lists"}