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

react-use-sub

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-use-sub - npm Package Compare versions

Comparing version 2.1.1 to 2.2.0

9

dist/cjs/index.js

@@ -38,6 +38,5 @@ 'use strict';

const _update = (D, next) => {
const result = {};
D.keys.forEach((key) => {
const p = D.data[key];
result[key] = key in next ? next[key] : p;
const result = { ...D.data };
Object.keys(next).forEach((key) => {
result[key] = next[key];
});

@@ -80,7 +79,5 @@ D.data = result;

const createStore = (data) => {
const keys = Object.keys(data);
const D = {
data,
subs: new Set(),
keys,
};

@@ -87,0 +84,0 @@ const Store = _center(D);

@@ -34,6 +34,5 @@ import { useRef, useCallback, useEffect, useState } from 'react';

const _update = (D, next) => {
const result = {};
D.keys.forEach((key) => {
const p = D.data[key];
result[key] = key in next ? next[key] : p;
const result = { ...D.data };
Object.keys(next).forEach((key) => {
result[key] = next[key];
});

@@ -76,7 +75,5 @@ D.data = result;

const createStore = (data) => {
const keys = Object.keys(data);
const D = {
data,
subs: new Set(),
keys,
};

@@ -83,0 +80,0 @@ const Store = _center(D);

{
"name": "react-use-sub",
"version": "2.1.1",
"version": "2.2.0",
"description": "Subscription based lightweight React store",

@@ -5,0 +5,0 @@ "engines": {

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