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

r18gs

Package Overview
Dependencies
Maintainers
0
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

r18gs - npm Package Compare versions

Comparing version 1.1.3 to 2.0.0-alpha.0

2

dist/index.d.ts

@@ -19,4 +19,2 @@ import type { SetStateAction, ValueType } from "./utils";

declare const useRGS: <T>(key: string, value?: ValueType<T>) => [T, SetStateAction<T>];
/** @deprecated - default export is deprecated and will be removed. Use `import { useRGS } from "r18gs"` */
export default useRGS;
export { useRGS };

2

dist/index.js

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

"use strict";var i=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var b=(e,t)=>{for(var n in t)i(e,n,{get:t[n],enumerable:!0})},v=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of p(t))!f.call(e,o)&&o!==n&&i(e,o,{get:()=>t[o],enumerable:!(r=g(t,o))||r.enumerable});return e};var x=e=>v(i({},"__esModule",{value:!0}),e);var A={};b(A,{default:()=>d,useRGS:()=>l});module.exports=x(A);var a=require("react");var c=globalThis;c.rgs={};var s=c.rgs;var T=e=>t=>{let n=s[e];return n.l.push(t),()=>{n.l=n.l.filter(r=>r!==t)}},u=e=>t=>{let n=s[e];n.v=typeof t=="function"?t(n.v):t,n.l.forEach(r=>r())},S=e=>{let t=s[e],n=()=>t.v;return[(0,a.useSyncExternalStore)(t.u,n,n),t.s]};var l=(e,t)=>(s[e]||(s[e]={v:typeof t=="function"?t():t,l:[],s:u(e),u:T(e)}),S(e)),d=l;0&&(module.exports={useRGS});
"use strict";var i=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var f=(e,t)=>{for(var n in t)i(e,n,{get:t[n],enumerable:!0})},b=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of g(t))!p.call(e,o)&&o!==n&&i(e,o,{get:()=>t[o],enumerable:!(r=l(t,o))||r.enumerable});return e};var v=e=>b(i({},"__esModule",{value:!0}),e);var d={};f(d,{useRGS:()=>x});module.exports=v(d);var a=require("react");var c=globalThis;c.rgs={};var s=c.rgs;var T=e=>t=>{let n=s[e];return n.l.push(t),()=>{n.l=n.l.filter(r=>r!==t)}},u=e=>t=>{let n=s[e];n.v=typeof t=="function"?t(n.v):t,n.l.forEach(r=>r())},S=e=>{let t=s[e],n=()=>t.v;return[(0,a.useSyncExternalStore)(t.u,n,n),t.s]};var x=(e,t)=>(s[e]||(s[e]={v:typeof t=="function"?t():t,l:[],s:u(e),u:T(e)}),S(e));0&&(module.exports={useRGS});

@@ -5,3 +5,3 @@ {

"private": false,
"version": "1.1.3",
"version": "2.0.0-alpha.0",
"description": "A simple yet elegant, light weight, react18 global store to replace Zustand for better tree shaking.",

@@ -8,0 +8,0 @@ "license": "MPL-2.0",

@@ -11,2 +11,6 @@ # React18GlobalStore <img src="https://github.com/react18-tools/turborepo-template/blob/main/popper.png?raw=true" style="height: 40px"/>

### Important Announcement
The default export from `r18gs` is [deprecated](https://github.com/react18-tools/react18-global-store/discussions/31). Please switch to using `import { useRGS } from "r18gs"` instead. The default export will be removed in the next major release.
## Features

@@ -13,0 +17,0 @@

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