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

yux-storage

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yux-storage - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

2

package.json
{
"name": "yux-storage",
"version": "1.2.0",
"version": "1.2.1",
"description": "yux-storage 是一个基于 HTML5 IndexedDB 封装的 Web 本地数据离线存储库",

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

@@ -304,2 +304,13 @@ # yux-storage

同时也支持全局调用,可以通过监听 `document` 自定义事件
```js
document.addEventListener('yuxStorage', ev => {
// 自定义事件的数据在 ev.detail
const [type, detail] = ev.detail;
console.log(type, detail)
// ‘setItem’, '{key, value}'
})
```
> 支持多次调用

@@ -306,0 +317,0 @@

@@ -63,2 +63,5 @@ /**

triggerEvent() {
document.dispatchEvent(new CustomEvent('yuxStorage', {
detail: [...arguments]
}))
this.eventList.forEach(fn => {

@@ -65,0 +68,0 @@ fn(...arguments)

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