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

apical-store

Package Overview
Dependencies
Maintainers
0
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apical-store - npm Package Compare versions

Comparing version 0.0.5 to 0.0.51

2

package.json
{
"name": "apical-store",
"version": "0.0.5",
"version": "0.0.51",
"description": "Mobx-Syncable-IndexedDB",

@@ -5,0 +5,0 @@ "main": "dist/bundle.js",

import { Document } from "./model";
import { ObservableArray } from "./observable";
import { Store } from "./store";

@@ -7,16 +8,16 @@ class Component {

componentWillUnmount() {}
componentWillMount() {}
componentDidMount() {}
}
export function observe<D extends Document, G extends ObservableArray<D[]>>(
input: G
export function observe<D extends Document, G extends Store<D>>(
store: G
) {
return function <C extends typeof Component>(component: C) {
let oCWM = component.prototype.componentWillMount || (() => {});
component.prototype.componentWillMount = function () {
let oCWM = component.prototype.componentDidMount || (() => {});
component.prototype.componentDidMount = function () {
let unObservers: (() => void)[] = [];
this.setState({});
const observer = () => this.setState({});
input.observe(observer);
unObservers.push(() => input.unobserve(observer));
store.$$observableObject.observe(observer);
unObservers.push(() => store.$$observableObject.unobserve(observer));
const oCWU = this.componentWillUnmount || (() => {});

@@ -23,0 +24,0 @@ this.componentWillUnmount = () => {

@@ -14,3 +14,3 @@ import { Change, observable, ObservableArray } from "./observable";

private $$idb: IDB;
private $$observableObject: ObservableArray<T[]> = observable([] as T[]);
$$observableObject: ObservableArray<T[]> = observable([] as T[]);
private $$changes: Change<T[]>[] = [];

@@ -44,2 +44,3 @@ private $$token: string;

}) {
//TODO: token should be optional
this.$$idb = new IDB(name);

@@ -204,3 +205,3 @@ this.$$token = token;

*/
async $$syncTry(): Promise<{
private async $$syncTry(): Promise<{
pushed?: number;

@@ -207,0 +208,0 @@ pulled?: number;

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