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

deep-storage

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

deep-storage - npm Package Compare versions

Comparing version 0.3.4 to 0.3.5

4

lib/async.d.ts

@@ -43,3 +43,3 @@ import { DeepStorage, UsesDeepStorage } from "./index";

}
declare const _default: <Request, Response>(storage: DeepStorage<DeepAsyncData<Request, Response>, {}>, process: (request: Request) => Promise<Response>) => DefaultDeepAsync<Request, Response>;
export default _default;
export declare const deepAsync: <Request, Response>(storage: DeepStorage<DeepAsyncData<Request, Response>, {}>, process: (request: Request) => Promise<Response>) => DefaultDeepAsync<Request, Response>;
export default deepAsync;

@@ -172,5 +172,6 @@ "use strict";

exports.DefaultDeepAsync = DefaultDeepAsync;
exports.default = function (storage, process) {
exports.deepAsync = function (storage, process) {
return new DefaultDeepAsync(storage, process);
};
exports.default = exports.deepAsync;
//# sourceMappingURL=async.js.map

@@ -48,2 +48,9 @@ export declare type StateUpdateCallback = <DeepState>(path: Path, newState: DeepState, oldState: DeepState) => void;

path: Path;
/**
* Returns an object with keys from State and values of
* DeepStorage for that key
*/
properties: {
[P in keyof State]: DeepStorage<State[P]>;
};
}

@@ -82,2 +89,5 @@ /**

path: Path;
readonly properties: {
[P in keyof State]: DeepStorage<State[P], {}>;
};
}

@@ -97,2 +107,5 @@ export declare class NestedDeepStorage<State, RootState> implements DeepStorage<State, RootState> {

root: () => DeepStorage<RootState, {}>;
readonly properties: {
[P in keyof State]: DeepStorage<State[P], {}>;
};
}

@@ -99,0 +112,0 @@ export declare function parsePath(path: Path | stringOrNumber): Path;

@@ -167,2 +167,14 @@ "use strict";

}
Object.defineProperty(DefaultDeepStorage.prototype, "properties", {
get: function () {
var result = {};
var state = this.state;
for (var key in state) {
result[key] = this.deep(key);
}
return result;
},
enumerable: true,
configurable: true
});
return DefaultDeepStorage;

@@ -245,2 +257,14 @@ }());

});
Object.defineProperty(NestedDeepStorage.prototype, "properties", {
get: function () {
var result = {};
var state = this.state;
for (var key in state) {
result[key] = this.deep(key);
}
return result;
},
enumerable: true,
configurable: true
});
return NestedDeepStorage;

@@ -247,0 +271,0 @@ }());

{
"name": "deep-storage",
"version": "0.3.4",
"version": "0.3.5",
"description": "Simple observable state management for reactive applications",

@@ -5,0 +5,0 @@ "main": "./lib/index.js",

@@ -70,3 +70,3 @@ import { DeepStorage, UsesDeepStorage } from "./index";

export default <Request, Response>(
export const deepAsync = <Request, Response>(
storage: DeepStorage<DeepAsyncData<Request, Response>>,

@@ -77,1 +77,3 @@ process: (request: Request) => Promise<Response>

}
export default deepAsync;

@@ -58,3 +58,9 @@ export type StateUpdateCallback = <DeepState>(path: Path, newState: DeepState, oldState: DeepState) => void;

*/
path: Path
path: Path;
/**
* Returns an object with keys from State and values of
* DeepStorage for that key
*/
properties: {[P in keyof State]: DeepStorage<State[P]>}
}

@@ -177,2 +183,10 @@

path: Path = [];
get properties() {
const result = {} as {[P in keyof State]: DeepStorage<State[P]>};
const state = this.state;
for (let key in state) {
result[key] = this.deep(key);
}
return result;
}
}

@@ -221,2 +235,10 @@

root = () => this.rootStorage;
get properties() {
const result = {} as {[P in keyof State]: DeepStorage<State[P]>};
const state = this.state;
for (let key in state) {
result[key] = this.deep(key);
}
return result;
}
}

@@ -223,0 +245,0 @@

Sorry, the diff of this file is not supported yet

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