react-native-storage
Advanced tools
Comparing version 0.0.5 to 0.0.6
{ | ||
"name": "react-native-storage", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"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", |
@@ -79,3 +79,3 @@ # react-native-storage | ||
If you want to get several data to in one action, then use these methods. Examples: | ||
If you want to get several data in one action, then use these methods. Examples: | ||
如果你想在一次操作中获取多个数据,那就使用上面的两个方法。示例: | ||
@@ -82,0 +82,0 @@ |
@@ -55,10 +55,8 @@ /* | ||
} | ||
static save(id, data, global, expires){ | ||
static save(id, rawData, global, expires){ | ||
let s = Storage._s, d; | ||
if(s){ | ||
if(typeof data !== 'object' || data === null){ | ||
data = { | ||
objWrap:data | ||
}; | ||
} | ||
let data = { | ||
rawData | ||
}; | ||
let now = new Date().getTime(); | ||
@@ -151,4 +149,3 @@ if(expires === undefined){ | ||
} | ||
ret.objWrap && (ret = ret.objWrap); | ||
resolve(ret); | ||
resolve(ret.rawData); | ||
} | ||
@@ -181,4 +178,3 @@ } | ||
} | ||
ret.objWrap && (ret = ret.objWrap); | ||
resolve(ret); | ||
resolve(ret.rawData); | ||
} | ||
@@ -185,0 +181,0 @@ } |
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
14874
280