
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
electron-store-vuex-sync
Advanced tools
自动同步electron-store
和vuex
const { ipcMain } = require('electron')
const Store = require('electron-store');
const { injectStore } = require('electron-store-vuex-sync')
const store = new Store();
injectStore(ipcMain, store)
import Vuex from 'vuex'
import { getVuexStoreConfig } from 'electron-store-vuex-sync'
import { ipcRenderer } from 'electron'
const store = new Vuex.Store(getVuexStoreConfig(ipcRenderer))
return store
electron
的ipcMain
用来注入监听事件electron-store
创建的store
store
的名字需要不同页面同步不同store
的时候需要,可选返回传入的store
electron
的ipcRenderer
用来注入监听事件electron-store
的schema
可以根据这个自动初始化,省去手动的问题store
的名字需要不同页面同步不同store
的时候需要,可选如果使用schema
来初始化的话,vuex
的mutation
为set:schema的key
只会生成对应的vuex
配置,像是state
,action
这些你可以通过解构等方法把自己的方法注入进去
因为electron-store
默认名字为config
,所以vuex
用来初始化和同步的事件前缀也默认为config:
background
的注入请放在最顶上
FAQs
auto sync electron-store and vuex
We found that electron-store-vuex-sync demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.