Socket
Socket
Sign inDemoInstall

araz

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

araz - npm Package Compare versions

Comparing version 2.1.0 to 2.1.1

2

package.json
{
"name": "araz",
"version": "2.1.0",
"version": "2.1.1",
"description": "",

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

@@ -24,3 +24,2 @@ type Ref<T> = {

target[key] = value;
console.log("Value changed:", value);
return true;

@@ -39,8 +38,10 @@ }

export const reactive = <T>(obj: T): ReactiveObject<T> => {
export const reactive = <T extends Record<string, any>>(
obj: T
): ReactiveObject<T> => {
const reactiveObject = {} as ReactiveObject<T>;
for (const key in obj) {
if (obj[key]) {
reactiveObject[key] = ref(obj[key]);
if (Object.prototype.hasOwnProperty.call(obj, key)) {
reactiveObject[key as keyof T] = ref(obj[key]);
}

@@ -52,3 +53,3 @@ }

if (key in target) {
return target[key].value;
return target[key as keyof T].value;
}

@@ -58,4 +59,3 @@ },

if (key in target) {
target[key].value = value;
console.log(`Value changed for ${String(key)}:`, value);
target[key as keyof T].value = value;
return true;

@@ -62,0 +62,0 @@ }

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