
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
sprinkles-js
Advanced tools
Sprinkles is a small library to add small amounts of javascript to your html.
Sprinkles is a small library to add small amounts of javascript to your html.
We try to simplify working with custom elements by:
This approach takes inspiration from AlpineJS and Stimulus, but is fully build around custom elements.
You can easily build your own custom element on top of SprinklesElement
. A simple hello world:
import { SprinklesElement } from "sprinkles-js";
class HelloWorldElement extends SprinklesElement {
static tagName = "hello-world";
static events = {
click: "greet"
}
greet(event) {
console.log("Got click event: ", event);
alert("Hello world!")
}
}
HelloWorldElement.register();
<hello-world></hello-world>
In addition to the abstract sprinkles element, we also include some basic elements that you can use.
A card that can be clicked anywhere to follow the link inside it:
import { ClickableCard } from "sprinkles-js";
ClickableCard.register();
<clickable-card>
<p>Some text</p>
</p>
<a href="https://example.com" data-clickable-card-ref="link">A link</a>
<button>A button that doesn't trigger</button>
</clickable-card>
This library was extracted from various projects at Tree company.
V0.2.1
FAQs
Sprinkles is a small library to add small amounts of javascript to your html.
The npm package sprinkles-js receives a total of 279 weekly downloads. As such, sprinkles-js popularity was classified as not popular.
We found that sprinkles-js demonstrated a healthy version release cadence and project activity because the last version was released less than 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
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.