Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
ember-raf-scheduler
Advanced tools
Changelog
v0.4.1 (2023-09-09)
Readme
Super simple RAF scheduler that integrates with the Ember runloop
Super simple example:
import { scheduler } from 'ember-raf-scheduler';
// schedule a job
const job = scheduler.schedule('measure', () => {
console.log('Hello, world!');
});
// cancel the job
scheduler.forget(job);
There are 4 queues:
sync
- Wrapped in a runloop, use this queue for all Ember related worklayout
- This queue can be used for touch up on the Ember work in general
(small DOM manipulations, for instance)measure
- General measurements should occur hereaffect
- Fixup DOM manipulation after measurements have been doneTokens can be created and passed into the scheduler. All jobs that were scheduled with a token can be cancelled by cancelling the parent token.
import { scheduler, Token } from 'ember-raf-scheduler';
export default Component.extend({
init() {
this.token = new Token();
},
willDestroy() {
scheduler.forget(this.token);
},
schedule(queue, job) {
scheduler.schedule(queue, job, this.token);
}
});
Measurements in RAFs are basically free if you do them before any other
DOM manipulation (same rules as standard forced layouts, etc), so you should
batch all measurements in measure
and if possible avoid using the sync
and layout
queues. There are times when it's necessary to do Ember specific
manipulations (for instance, you need to use set
and you want the template
to render before you measure) which is what the sync
and layout
queues
are for.
git clone <repository-url>
this repositorycd ember-raf-scheduler
yarn install
ember serve
yarn test
(Runs ember try:each
to test your addon against multiple Ember versions)ember test
ember test --server
ember build
For more information on using ember-cli, visit https://ember-cli.com/.
FAQs
The default blueprint for ember-cli addons.
The npm package ember-raf-scheduler receives a total of 46,511 weekly downloads. As such, ember-raf-scheduler popularity was classified as popular.
We found that ember-raf-scheduler demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.