Socket
Socket
Sign inDemoInstall

angular2-take-until-destroy

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular2-take-until-destroy - npm Package Compare versions

Comparing version 1.0.4 to 2.0.0

5

dist/angular2-take-until-destroy.js

@@ -1,4 +0,7 @@

import { Subject } from "rxjs";
import { Subject } from 'rxjs/Subject';
export function TakeUntilDestroy(constructor) {
var originalDestroy = constructor.prototype.ngOnDestroy;
if (typeof originalDestroy !== 'function') {
console.warn(constructor.name + " is using @TakeUntilDestroy but does not implement OnDestroy");
}
constructor.prototype.componentDestroy = function () {

@@ -5,0 +8,0 @@ this._takeUntilDestroy$ = this._takeUntilDestroy$ || new Subject();

3

dist/index.d.ts

@@ -1,2 +0,1 @@

import { TakeUntilDestroy } from "./angular2-take-until-destroy";
export default TakeUntilDestroy;
export { TakeUntilDestroy } from "./angular2-take-until-destroy";

@@ -1,3 +0,2 @@

import { TakeUntilDestroy } from "./angular2-take-until-destroy";
export default TakeUntilDestroy;
export { TakeUntilDestroy } from "./angular2-take-until-destroy";
//# sourceMappingURL=index.js.map
{
"name": "angular2-take-until-destroy",
"version": "1.0.4",
"version": "2.0.0",
"main": "dist/index.js",

@@ -5,0 +5,0 @@ "description": "Add take until component destroy for easy unsubscribe when the component destroyed",

@@ -1,4 +0,4 @@

# Angular 2 - easy unsubscribe when component destroyed
# Angular 2+ - Unsubscribe for pros [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome)
##### Angular 2 decorator - easy and declarative way to unsubscribe from observables when the component destroyed
##### Declarative way to unsubscribe from observables when the component destroyed

@@ -10,3 +10,3 @@ ## Installation

```js
import TakeUntilDestroy from "angular2-take-until-destroy";
import { TakeUntilDestroy } from "angular2-take-until-destroy";

@@ -13,0 +13,0 @@ @Component({

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc