Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
@orchestrator/ngx-until-destroyed
Advanced tools
RxJS operator that unsubscribes from observable on Angular component destruction
Declarative way to unsubscribe from observables when the component destroyed
$ npm install @orchestrator/ngx-until-destroyed --save
import { untilDestroyed } from '@orchestrator/ngx-until-destroyed';
@Component({
selector: 'app-inbox',
templateUrl: './inbox.component.html',
})
export class InboxComponent implements OnInit, OnDestroy {
ngOnInit() {
interval(1000)
.pipe(untilDestroyed(this))
.subscribe(val => console.log(val));
}
// This method must be present, even if empty.
ngOnDestroy() {
// To protect you, we'll throw an error if it doesn't exist.
}
}
import { WithUntilDestroyed } from '@orchestrator/ngx-until-destroyed';
@Component({...})
class MyComponent implements OnDestroy {
@WithUntilDestroyed()
stream$ = interval(1000); // You can safely subscribe to this everywhere
// This method must be present, even if empty
ngOnDestroy() {}
}
import { untilDestroyed } from '@orchestrator/ngx-until-destroyed';
export class Widget {
constructor() {
interval(1000)
.pipe(untilDestroyed(this, 'destroy'))
.subscribe(console.log);
}
// The name needs to be the same as the decorator parameter
destroy() {}
}
FAQs
RxJS operator that unsubscribes from observable on Angular component destruction
The npm package @orchestrator/ngx-until-destroyed receives a total of 6 weekly downloads. As such, @orchestrator/ngx-until-destroyed popularity was classified as not popular.
We found that @orchestrator/ngx-until-destroyed demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.