New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

roxe

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

roxe - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

4

index.d.ts

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

import { Subject, Subscription } from "rxjs";
import { Subscription, Observable } from "rxjs";
import { observedObjects } from "./observedObjectsSymbol";

@@ -17,3 +17,3 @@ export declare type ObservableObjectType<T> = _ObservableObject<T> & T;

*/
observe<A = any>(prop: string): Subject<A>;
observe<A = any>(prop: string): Observable<A>;
/**

@@ -20,0 +20,0 @@ * Unsubscribes from all the subscriptions in a specific pool

@@ -6,12 +6,2 @@ "use strict";

const observedObjectsSymbol_1 = require("./observedObjectsSymbol");
/**
* A Subject that will only memorize its subscribers
* And remove them on unsubscribe.
* Unsubscription will not close or stop the Subject itself.
*/
class ReusableSubject extends rxjs_1.Subject {
unsubscribe() {
this.observers = [];
}
}
class _ObservableObject {

@@ -119,5 +109,5 @@ constructor(from = {}, optHandlers = {}) {

if (!this[observedObjectsSymbol_1.observedObjects][prop]) {
this[observedObjectsSymbol_1.observedObjects][prop] = new ReusableSubject();
this[observedObjectsSymbol_1.observedObjects][prop] = new rxjs_1.Subject();
}
return this[observedObjectsSymbol_1.observedObjects][prop];
return this[observedObjectsSymbol_1.observedObjects][prop].asObservable();
}

@@ -124,0 +114,0 @@ /**

{
"name": "roxe",
"version": "1.0.5",
"version": "1.0.6",
"description": "Observe object changes through proxies",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -107,3 +107,3 @@ # Roxe

```typescript
observableObject.observe<A = any>(prop: string): Subject<A>;
observableObject.observe<A = any>(prop: string): Observable<A>;
```

@@ -113,5 +113,3 @@

Use this method to register a Subject to subscribe to.
To avoid confusion between Subject `.unsubscribe` and Subscription `.unsubscribe`, the returned Subject will unsubscribe only the registered `Subscriptions` without closing/stopping the Subject, even if (I know...), Subject shouldn't be reusable.
Use this method to create an Observable to which you can subscribe to.
This methods accepts a generic type `A` that will be passed to the creation of the Subject.

@@ -123,3 +121,3 @@

`Subject<A>`
`Observable<A>`

@@ -205,3 +203,3 @@ <br>

This project compiles to a `CommonJS` module as the original project this comes from (see below), used Webpack, which does not digest `UMD` modules (using some loaders was breaking the debugging process for some reasons). If you'll need to get the UMD version,, I have prepared an npm script to achieve this. Follow the script below:
This project compiles to a `CommonJS` module as the original project this comes from (see below), used Webpack, which does not digest `UMD` modules (using some loaders was breaking the debugging process for some reasons). If you'll need to get the UMD version, I have prepared an npm script to achieve this. Follow the script below:

@@ -208,0 +206,0 @@ ```sh

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