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

ag-reactive

Package Overview
Dependencies
Maintainers
0
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ag-reactive - npm Package Compare versions

Comparing version 1.0.8 to 1.0.9

2

index.d.ts

@@ -11,3 +11,3 @@ import { Wrapper } from "./Wrapper";

};
export declare function reactive<T>(raw: T): T;
export declare function reactive<T>(raw: T, id?: string): T;
export declare function observe(obj: any, cb: (delta: Delta) => void): {

@@ -14,0 +14,0 @@ id: string;

@@ -44,7 +44,11 @@ "use strict";

exports.isReactive = isReactive;
function reactive(raw) {
function reactive(raw, id) {
var _a, _b;
if (isRaw(raw) || isReactive(raw))
if (isRaw(raw) || isReactive(raw)) {
if (id) {
throw 'failed to create a new reactive object to hold the given id';
}
return raw;
var obj = new Wrapper_1.Wrapper(Array.isArray(raw));
}
var obj = new Wrapper_1.Wrapper(Array.isArray(raw), id);
for (var key in raw) {

@@ -51,0 +55,0 @@ var value = ((_b = (_a = Object.getOwnPropertyDescriptor(raw, key)) === null || _a === void 0 ? void 0 : _a.get) !== null && _b !== void 0 ? _b : raw[key]);

{
"name": "ag-reactive",
"version": "1.0.8",
"version": "1.0.9",
"description": "",

@@ -5,0 +5,0 @@ "author": "",

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