fluxible-js
Advanced tools
Comparing version 6.1.1 to 6.1.2
export declare type SyncStorage<Store> = { | ||
getItem: (key: string) => string; | ||
getItem: (key: string) => string | Record<string, any> | null; | ||
setItem: (key: string, value: string | Store) => void; | ||
}; | ||
export declare type AsyncStorage<Store> = { | ||
getItem: (key: string) => Promise<string | Record<string, any>>; | ||
getItem: (key: string) => Promise<string | Record<string, any> | null>; | ||
setItem: (key: string, value: string | Store) => Promise<any>; | ||
@@ -8,0 +8,0 @@ }; |
@@ -28,3 +28,3 @@ "use strict"; | ||
if (persist) { | ||
if ('asyncStorage' in persist) { | ||
if (persist.asyncStorage) { | ||
persistStorage = persist.asyncStorage; | ||
@@ -42,4 +42,2 @@ persistStorage.getItem('fluxible-js').then(function (savedStore) { | ||
}); | ||
if (initCallback) | ||
initCallback(); | ||
}); | ||
@@ -60,5 +58,5 @@ } | ||
}); | ||
if (initCallback) | ||
initCallback(); | ||
} | ||
if (initCallback) | ||
initCallback(); | ||
} | ||
@@ -65,0 +63,0 @@ function updateStore(updatedStates) { |
{ | ||
"name": "fluxible-js", | ||
"version": "6.1.1", | ||
"version": "6.1.2", | ||
"description": "Smaller, faster, better state management system that supports asynchronicity and state persistence out of the box.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
92448
2406