Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@storeon/crosstab
Advanced tools
Module for storeon to sync state at different tabs of the browser
Module for Storeon to synchronize actions for browser tabs with filtering of events that need to be synchronized.
It size is 219 bytes (minified and gzipped) and uses Size Limit to control size.
npm install @storeon/crosstab
# or
yarn add @storeon/crosstab
If you want sync state between tabs of the browser you should import the crossTab
from @storeon/crosstab
and add this module to createStore
.
import { createStoreon } from 'storeon'
import { persistState } from '@storeon/localstorage'
import { crossTab } from '@storeon/crosstab'
const increment = store => {
store.on('@init', () => ({ count: 0, openMenu: false }))
store.on('inc', ({ count }) => ({ count: count + 1 }))
store.on('toggleMenu', ({ openMenu }) => ({ openMenu: !openMenu }))
}
const store = createStoreon([
increment,
persistState(),
crossTab({ filter: (event, data) => event !== 'toggleMenu' })
])
store.on('@changed', (store) => {
document.querySelector('.counter').innerText = store.count
})
import crossTab from '@storeon/crosstab'
const moduleCrossTab = crossTab({
filter: (event, data) => event !== 'dec',
key: 'storeon-crosstab'
})
Function crossTab
could have options:
true
if need sync this action. Takes parameters of an event name and a data that is sent.@storeon/crosstab
is not compatible with server-side rendering since it require window
to operate. You can exclude it during server-side render process.
const store = createStoreon([
increment,
...typeof window !== 'undefined' ? [
crossTab({ filter: (event, data) => event !== 'toggleMenu' })
] : []
])
MIT
1.0.2
FAQs
Module for storeon to sync state at different tabs of the browser
The npm package @storeon/crosstab receives a total of 42 weekly downloads. As such, @storeon/crosstab popularity was classified as not popular.
We found that @storeon/crosstab demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.