Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@rimbu/actor

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rimbu/actor - npm Package Compare versions

Comparing version 0.6.7 to 0.6.8

8

package.json
{
"name": "@rimbu/actor",
"version": "0.6.7",
"version": "0.6.8",
"description": "State management tools to create stateful logic that can be easily integrated in any framework",

@@ -14,3 +14,3 @@ "keywords": [

],
"homepage": "http://rimbu.org",
"homepage": "https://rimbu.org",
"author": {

@@ -59,3 +59,3 @@ "name": "Arvid Nicolaas",

"dependencies": {
"@rimbu/deep": "^0.7.5",
"@rimbu/deep": "^0.7.6",
"tslib": "^2.3.1"

@@ -69,3 +69,3 @@ },

},
"gitHead": "e509f9938fad6253702f6b78eb9f8e3b3a8f92ac"
"gitHead": "20739fd0c0d5c565eeecd3e266dd51f893e8d67c"
}

@@ -9,3 +9,3 @@ <p align="center">

For complete documentation please visit the _[Rimbu Docs](http://rimbu.org)_.
For complete documentation please visit the _[Rimbu Docs](https://rimbu.org)_.

@@ -12,0 +12,0 @@ ## Installation

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

import type { Immutable } from '@rimbu/deep';
import type { Obs } from './internal';

@@ -8,11 +9,11 @@

get obs() {
get obs(): Obs<T, D> {
return this.actor.obs;
}
get obsReadonly() {
get obsReadonly(): Obs.Readonly<T & D> {
return this.actor.obsReadonly;
}
get state() {
get state(): Immutable<T & D> {
return this.actor.state;

@@ -19,0 +20,0 @@ }

@@ -22,3 +22,3 @@ import { Immutable, Literal, patch, Patch, Path } from '@rimbu/deep';

return () => {
return (): void => {
this._subscribers.delete(onChange);

@@ -33,3 +33,3 @@

notify(newState: T, oldState: T) {
notify(newState: T, oldState: T): void {
for (const subscriber of this._subscribers) {

@@ -70,7 +70,7 @@ subscriber(newState, oldState);

get obs() {
get obs(): this {
return this;
}
get obsReadonly() {
get obsReadonly(): this {
return this;

@@ -148,3 +148,3 @@ }

return () => {
return (): void => {
unsubscribe1();

@@ -158,3 +158,3 @@ unsubscribe2?.();

onFirstSubscription,
onGetState: () => {
onGetState: (): void => {
if (!result.hasSubscribers) {

@@ -187,3 +187,3 @@ result.setState(mapTo(this.state));

return () => {
return (): void => {
unsubscribe1();

@@ -197,3 +197,3 @@ unsubscribe2?.();

onFirstSubscription,
onGetState: () => {
onGetState: (): void => {
if (!result.hasSubscribers) {

@@ -203,3 +203,3 @@ result.setState(mapTo(this.state));

},
onSetState: (newState) => {
onSetState: (newState): void => {
if (Object.is(mapTo(this.state), newState)) return;

@@ -288,3 +288,3 @@

const unsubscribe3 = options?.onFirstSubscription?.();
return () => {
return (): void => {
unsubscribe1();

@@ -297,3 +297,3 @@ unsubscribe2();

onFirstSubscription,
onGetState: () => {
onGetState: (): void => {
if (!result.hasSubscribers) {

@@ -331,3 +331,3 @@ result.setState(mapTo(this.state, other.state));

return () => {
return (): void => {
unsubscribe1();

@@ -342,3 +342,3 @@ unsubscribe2();

derive: options?.derive,
onGetState: () => {
onGetState: (): void => {
if (!result.hasSubscribers) {

@@ -348,3 +348,3 @@ result.setState(mapTo(this.state, other.state));

},
onSetState: (newCombinedState) => {
onSetState: (newCombinedState): void => {
const parentPatch = mapFrom(newCombinedState);

@@ -351,0 +351,0 @@

@@ -35,3 +35,3 @@ import { Obs } from './internal';

async function start() {
async function start(): Promise<void> {
let nextProcess: Process | undefined;

@@ -53,3 +53,3 @@

isProcessing,
add(process: Process) {
add(process: Process): Promise<void> {
return new Promise<void>((resolve, reject) => {

@@ -56,0 +56,0 @@ queue.push(async () => {

Sorry, the diff of this file is not supported yet

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