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

react-native-storage

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-storage - npm Package Compare versions

Comparing version 0.0.15 to 0.0.16

2

package.json
{
"name": "react-native-storage",
"version": "0.0.15",
"version": "0.0.16",
"description": "This is a local storage wrapper for both react-native(AsyncStorage) and browser(localStorage). ES6/babel is needed.",

@@ -5,0 +5,0 @@ "main": "storage.js",

@@ -251,2 +251,5 @@ # react-native-storage [![Build Status](https://travis-ci.org/sunnylqm/react-native-storage.svg)](https://travis-ci.org/sunnylqm/react-native-storage) [![npm version](https://badge.fury.io/js/react-native-storage.svg)](http://badge.fury.io/js/react-native-storage)

#### 0.0.16
1. getBatchDataWithIds现在不会在本地数据齐全的情况下触发sync方法了
#### 0.0.15

@@ -253,0 +256,0 @@ 1. 修复promise链式调用中的bug.

@@ -263,2 +263,5 @@ # react-native-storage [![Build Status](https://travis-ci.org/sunnylqm/react-native-storage.svg)](https://travis-ci.org/sunnylqm/react-native-storage) [![npm version](https://badge.fury.io/js/react-native-storage.svg)](http://badge.fury.io/js/react-native-storage)

#### 0.0.16
1. getBatchDataWithIds now won't invoke sync if everything is ready in storage.
#### 0.0.15

@@ -265,0 +268,0 @@ 1. Fix bugs in promise chain.

/*
* local storage(web/react native) wrapper
* sunnylqm 2016-02-24
* version 0.0.15
* sunnylqm 2016-03-03
* version 0.0.16
*/

@@ -159,9 +159,19 @@

ids.map((id) => me.load({ key, id, syncInBackground, autoSync: false, batched: true }))
).then((results) => new Promise((resolve, reject) => me.sync[key]({
id: results
.filter((value) => value.syncId !== undefined)
.map((value) => value.syncId),
resolve,
reject
})).then((data) => results.map((value) => value.syncId ? data.shift() : value)))
).then((results) => {
return new Promise((resolve, reject) => {
const ids = results.filter((value) => value.syncId !== undefined);
if(!ids.length){
return resolve();
}
return me.sync[key]({
id: ids.map((value) => value.syncId),
resolve,
reject
});
}).then((data) => {
return results.map(value => {
return value.syncId ? data.shift() : value
});
});
})
}

@@ -168,0 +178,0 @@ _lookupGlobalItem(params) {

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