
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
@aaronshaf/html-router
Advanced tools
Supply Chain Security
Vulnerability
Quality
Maintenance
License
Unpopular package
QualityThis package is not very popular.
Found 1 instance in 1 package
Drop-in router.
<script src="https://unpkg.com/@aaronshaf/html-router@1/hash.js" type="module"></script>
<ul>
<li><a href="#/foo">Foo</a></li>
<li><a href="#/bar">Bar</a></li>
<li><a href="#/baz">Baz</a></li>
</ul>
<hash-switch>
<template data-path="/foo">
<h1>Foo</h1>
</template>
<template data-path="/bar">
<h1>Bar</h1>
</template>
<template data-path="(.*)">
<h1>Not found</h1>
</template>
</hash-switch>
<ul>
<li><a href="#/">Home</a></li>
<li><a href="#/foo">Foo</a></li>
<li><a href="#/foo/bar">Foo and Bar</a></li>
</ul>
<hash-route path="/">
<h2>Home</h2>
</hash-route>
<hash-route path="/foo(.*)">
<h2>Foo</h2>
</hash-route>
<hash-route path="/foo/bar">
<h2>Bar</h2>
</hash-route>
<script src="https://unpkg.com/@aaronshaf/html-router@1/pathname.js" type="module"></script>
<ul>
<li>
<pushstate-link><a href="/foo">Foo</a></pushstate-link>
</li>
<li>
<pushstate-link><a href="/bar">Bar</a></pushstate-link>
</li>
<li>
<pushstate-link><a href="/baz">Baz</a></pushstate-link>
</li>
</ul>
<pathname-switch>
<template data-path="/foo">
<h1>Foo</h1>
</template>
<template data-path="/bar">
<h1>Bar</h1>
</template>
<template data-path="(.*)">
<h1>Not found</h1>
</template>
</pathname-switch>
<ul>
<li>
<pushstate-link><a href="/foo">Foo</a></pushstate-link>
</li>
<li>
<pushstate-link><a href="/foo/bar">Foo & Bar</a></pushstate-link>
</li>
</ul>
<pathname-route path="/foo(.*)">
<h2>Foo</h2>
</pathname-route>
<pathname-route path="/foo/bar">
<h2>Bar</h2>
</pathname-route>
Custom elements that are children of a route or switch can access match data at this.match
.
<style>
hash-switch:not(:defined),
pathname-switch:not(:defined) {
visibility: hidden;
}
</style>
<script src="https://unpkg.com/@webcomponents/webcomponentsjs@2/webcomponents-loader.js"></script>
FAQs
Drop-in router
We found that @aaronshaf/html-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
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.
Research
/Security News
A malicious Go module posing as an SSH brute forcer exfiltrates stolen credentials to a Telegram bot controlled by a Russian-speaking threat actor.