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.
cycle-routing-driver
Advanced tools
Routing driver for CycleJS that enables simple client-side routing.
npm install --save cycle-routing-driver
Updating the location bar and clicking links already works, so most of the work is hands-off. If you do need to force a route change based on an event, just stream it in via the sinks.
import {run} from '@cycle/run'
import makeRoutingDriver, {routes} from 'lib/cyclejs/routing-driver'
function main(sources) {
// in addition to path data and parameters, we get query string data so your page can render accordingly
const modal_ = sources.route.map(({query}) => query.modal)
return {
// other stuff...,
route: xs.merge(
// if you would prefer to just bounce bad urls somewhere, you can!
sources.route.filter(({page}) => page === `404`).mapTo({page: `homepage`}),
// updating the URL always happens contextually - what streams through is reduced into the existing route
sources.DOM.select(`.signup-modal`).events(`click`).mapTo({query: {modal: `signup`}}),
// mapping query values to null removes them entirely
sources.DOM.select(`.modal-close`).events(`click`).mapTo({query: {modal: null}}),
),
}
}
run(main, {
// other stuff...,
route: makeRoutingDriver(
// the routes DSL provides a clean interface for defining basic routes
routes`
homepage
about
post (/posts/:post) -> view
view
edit
performance -> dashboard
demographics
reach
dashboard
search-ranking
`,
{
params: {
post: {
toData: _ => _,
toParam: data => data.id || data,
},
},
}
)
})
FAQs
A bare-bones router for simple frontend routing in CycleJS
The npm package cycle-routing-driver receives a total of 28 weekly downloads. As such, cycle-routing-driver popularity was classified as not popular.
We found that cycle-routing-driver 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.