deep-storage
Advanced tools
Comparing version 0.3.1 to 0.3.2
@@ -11,2 +11,6 @@ import { DeepStorage } from "./index"; | ||
completed: boolean; | ||
succeeded: boolean; | ||
running: boolean; | ||
started: boolean; | ||
failed: boolean; | ||
request?: Request; | ||
@@ -30,2 +34,6 @@ response?: Response; | ||
readonly status: AsyncStatus; | ||
readonly running: boolean; | ||
readonly started: boolean; | ||
readonly succeeded: boolean; | ||
readonly failed: boolean; | ||
readonly completed: boolean; | ||
@@ -32,0 +40,0 @@ readonly request: Request; |
@@ -116,2 +116,22 @@ "use strict"; | ||
}); | ||
Object.defineProperty(DefaultDeepAsync.prototype, "running", { | ||
get: function () { return this.storage.state.status === AsyncStatus.Running; }, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
Object.defineProperty(DefaultDeepAsync.prototype, "started", { | ||
get: function () { return this.storage.state.status !== AsyncStatus.Created; }, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
Object.defineProperty(DefaultDeepAsync.prototype, "succeeded", { | ||
get: function () { return this.storage.state.status === AsyncStatus.Succeeded; }, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
Object.defineProperty(DefaultDeepAsync.prototype, "failed", { | ||
get: function () { return this.storage.state.status === AsyncStatus.Failed; }, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
Object.defineProperty(DefaultDeepAsync.prototype, "completed", { | ||
@@ -118,0 +138,0 @@ get: function () { return this.storage.state.status === AsyncStatus.Failed || this.storage.state.status == AsyncStatus.Succeeded; }, |
{ | ||
"name": "deep-storage", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"description": "Simple observable state management for reactive applications", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -49,3 +49,3 @@ Deep Storage provides observable state for reactive applications in JavaScript. | ||
const DeepTimerView = deep(storage, {timer: ['timer']})(TimerView); | ||
const DeepTimerView = deep({timer: storage.deep('timer')})(TimerView); | ||
@@ -52,0 +52,0 @@ ReactDOM.render(( |
@@ -13,2 +13,6 @@ import { DeepStorage } from "./index"; | ||
completed: boolean; | ||
succeeded: boolean; | ||
running: boolean; | ||
started: boolean; | ||
failed: boolean; | ||
request?: Request; | ||
@@ -51,2 +55,6 @@ response?: Response; | ||
get status() { return this.storage.state.status; } | ||
get running() { return this.storage.state.status === AsyncStatus.Running } | ||
get started() { return this.storage.state.status !== AsyncStatus.Created } | ||
get succeeded() { return this.storage.state.status === AsyncStatus.Succeeded } | ||
get failed() { return this.storage.state.status === AsyncStatus.Failed } | ||
get completed() { return this.storage.state.status === AsyncStatus.Failed || this.storage.state.status == AsyncStatus.Succeeded } | ||
@@ -53,0 +61,0 @@ get request() { return this.storage.state.request }; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
179773
1032