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-choo
Advanced tools
A tiny connector for Storeon and Choo.
Size is only 81 bytes (minified and gzipped). It uses Size Limit to control size.
Read more about Storeon article.
npm install -S storeon-choo
or
yarn add storeon-choo
Create store using storeon
module:
store.js
import { createStoreon } from 'storeon'
let counter = store => {
store.on('@init', () => ({ count: 0 }))
store.on('inc', ({ count }) => ({ count: count + 1 }))
}
export const store = createStoreon([counter])
index.js
Use storeonMiddleware
from storeon-choo
.
import choo from 'choo'
import storeonMiddleware from 'storeon-choo'
import { store } from './store'
const app = choo()
app.use(storeonMiddleware(store))
app.route('/', require('./views/main'))
module.exports = app.mount('body')
Emitting @dispatch
event with payload (like [event, data]
) you will dispatch storeon
event. All states are located in state.storeon
property.
main.js
import html from 'choo/html'
export default function view(state, emit) {
const increment = () => emit('@dispatch', ['inc'])
return html`
<body>
<h1>Count: ${state.storeon.count}</h1>
<button onclick=${increment}></button>
</body>
`
}
FAQs
A tiny (81 bytes) connector for Storeon and Choo
We found that storeon-choo 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
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.