yux-storage
Advanced tools
Comparing version 2.1.0 to 2.1.1
{ | ||
"name": "yux-storage", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"description": "yux-storage 是一个基于 HTML5 IndexedDB 封装的 Web 本地数据离线存储库", | ||
@@ -5,0 +5,0 @@ "main": "yux-storage.js", |
@@ -148,2 +148,4 @@ # yux-storage | ||
> 在多账号下本地储存比较有用 | ||
## API | ||
@@ -318,5 +320,5 @@ | ||
```js | ||
yuxStorage.addEventListener((type, data) => { | ||
console.log(type, data) | ||
// ‘setItem’, '{key, value}' | ||
yuxStorage.addEventListener((type, data, projectName) => { | ||
console.log(type, data, projectName) | ||
// ‘setItem’, '{key, value}', 'yux-project' | ||
}) | ||
@@ -330,5 +332,5 @@ ``` | ||
// 自定义事件的数据在 ev.detail | ||
const [type, data] = ev.detail; | ||
console.log(type, data) | ||
// ‘setItem’, '{key, value}' | ||
const [type, data, projectName] = ev.detail; | ||
console.log(type, data, projectName) | ||
// ‘setItem’, '{key, value}', 'yux-project' | ||
}) | ||
@@ -335,0 +337,0 @@ ``` |
@@ -82,3 +82,3 @@ /** | ||
success(value); | ||
this.triggerEvent('setItem',{key,value}); | ||
this.triggerEvent('setItem',{key,value},this.projectName); | ||
}; | ||
@@ -103,3 +103,3 @@ request.onerror = error; | ||
success(key); | ||
this.triggerEvent('removeItem',{key}); | ||
this.triggerEvent('removeItem',{key},this.projectName); | ||
}; | ||
@@ -131,3 +131,3 @@ request.onerror = error; | ||
success(null); | ||
this.triggerEvent('clear',{key}); | ||
this.triggerEvent('clear',{ },this.projectName); | ||
};; | ||
@@ -134,0 +134,0 @@ request.onerror = error; |
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
14274
348