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.
@lemonadejs/rating
Advanced tools
Readme
Official website and documentation is here
Compatible with Vanilla JavaScript, LemonadeJS, React, Vue or Angular.
The LemonadeJS star rating plugin is a micro JavaScript component that implements the five star rating.
You can install using NPM or using directly from a CDN.
To install it in your project using npm, run the following command:
$ npm install @lemonadejs/rating
To use rating via a CDN, include the following script tags in your HTML file:
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/lemonadejs/dist/lemonade.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@lemonadejs/rating/dist/index.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@lemonadejs/rating/dist/style.min.css" />
Quick example with Lemonade
// For installation: % npm install @lemonadejs/rating
// Add to your HTML: <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
import lemonade from "lemonadejs";
import Rating from "@lemonadejs/rating";
export default function Component() {
const self = this;
self.plus = () => {
self.number++;
}
self.minus = () => {
self.number--;
}
self.reset = () => {
self.value = 1;
}
self.change = (newValue) => {
console.log('New value', newValue);
}
self.number = 5;
self.value = 3;
return `<div>
<p><Rating :value="self.value" :number="self.number" onchange="self.change" /></p>
<input type="button" value="Value=1" onclick="self.reset" />
<input type="button" value="Add star" onclick="self.plus" />
<input type="button" value="Remove star" onclick="self.minus" />
</div>`;
}
Attribute | Type | Description |
---|---|---|
name? | String | The name of the component |
number? | Number | The number of stars. Default 5. |
value? | Number | The initial value. Default null. |
Attribute | Description |
---|---|
onchange? | When the value of the component changes. |
The LemonadeJS LemonadeJS Rating is released under the MIT.
FAQs
LemonadeJS star rating plugin
The npm package @lemonadejs/rating receives a total of 0 weekly downloads. As such, @lemonadejs/rating popularity was classified as not popular.
We found that @lemonadejs/rating demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers 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.