yach.nim.util
Advanced tools
Comparing version 0.3.1 to 1.0.0
@@ -10,3 +10,4 @@ // elk | ||
import yachDB from 'yach.util.indexeddb'; | ||
import _yachDB from 'yach.util.indexeddb'; | ||
const yachDB = _yachDB('team') | ||
@@ -68,6 +69,10 @@ // get user | ||
if (!doNotUseYachCache) { | ||
const team = await yachDB.team.get(id); | ||
if (team) { | ||
util.logTime(`[${tag}]:===getTeamTime${id}`, true); | ||
return resolve(team); | ||
try { | ||
const team = await yachDB.getItem(id); | ||
if (team) { | ||
util.logTime(`[${tag}]:===getTeamTime${id}`, true); | ||
return resolve(team); | ||
} | ||
} catch (error) { | ||
console.error('yach.nim.util getTeam缓存获取异常', error) | ||
} | ||
@@ -83,6 +88,6 @@ } | ||
if (err) return reject(err); | ||
!doNotUseYachCache && | ||
yachDB.team.add({ | ||
...obj, | ||
}); //更新下缓存 | ||
// !doNotUseYachCache && | ||
// yachDB.team.add({ | ||
// ...obj, | ||
// }); //更新下缓存 | ||
return resolve(obj); | ||
@@ -89,0 +94,0 @@ }, |
{ | ||
"name": "yach.nim.util", | ||
"version": "0.3.1", | ||
"version": "1.0.0", | ||
"license": "MIT", | ||
@@ -12,4 +12,4 @@ "description": "yach nim: util", | ||
"yach.util.data": "0.0.5", | ||
"yach.util.indexeddb": "^2.0.0" | ||
"yach.util.indexeddb": "^3.0.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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
37241
896
1
+ Addedqiao.indexeddb.js@0.1.3(transitive)
+ Addedqiao.ls.js@0.1.0(transitive)
+ Addedyach.util.indexeddb@3.1.2(transitive)
- Removeddexie@3.2.7(transitive)
- Removedyach.util.indexeddb@2.0.0(transitive)
Updatedyach.util.indexeddb@^3.0.0