Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
max-router
Advanced tools
Readme
An opinionated browser routing configuration. Basically a wrapper around 2 libraries History and Url Mapper. The purpose being to provide a slightly simpler API for a common use case but without any real flexibility.
With npm:
> npm install --save-dev max-router
Or yarn:
> yarn add -D max-router
import * as router from 'max-router'
router.route('/badger/:id', async ({ id }) => {
const badger = await fetch(`example.com/badger/${id}`)
// Render badger page...
})
router.onMissing(async path => {
// Render 404
})
router.onError(async error => {
// Render 500
})
// Listen for changes to the url (also immediately invokes for current url)
router.listen({ catchUnhandledErrors: true }, async location => {
// Do middleware type stuff, like authentication...
// Invoke the router
router.onLocationChange(location)
})
// If you want to navigate somewhere
router.go('/badger/1')
The catchUnhandledErrors
option will set window.onerror
and window.onunhandledrejection
to call the router's onError
, so that unhandled errors can display the 500 page.
FAQs
Opinionated browser routing configuration
The npm package max-router receives a total of 0 weekly downloads. As such, max-router popularity was classified as not popular.
We found that max-router 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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.