Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
AfroRating is an Angular frontend star rating library.
npm install afrorating
import { Component } from '@angular/core';
import { AfroRatingComponent } from 'afrorating';
@Component({
selector: 'app-root',
standalone: true,
imports: [AfroRatingComponent],
templateUrl: './app.component.html',
styleUrl: './app.component.css'
})
export class AppComponent {
rate = 5;
onHoverChange(event: MouseEvent) {
console.log("hoverchanged", event);
}
onRateChange(value: number) {
console.log("ratechanged", value);
}
}
<div style="width:100%">
<afrorating [total]="10" [(rate)]="rate" [color]="'#ce0101'" [scaleDown]="10" (rateChange)="onRateChange($event)" (hoverChange)="onHoverChange($event)" [readonly]="false"></afrorating>
</div>
<div style="display:flex;flex-direction:row;width:50%;align-items:stretch;">
<afrorating [total]="10" [(rate)]="rate" [color]="'green'" [showTooltip]="false" [readonly]="true"></afrorating>
<div style="text-align:center;width:6vw;font-size:4vw;padding-left:1vw;padding-right:1vw" [style]="rate ? '' : 'visibility:hidden'">
{{rate}}
</div>
<button (click)="rate=0" style="width:10vw;color:white;background-color:green;">Clear</button>
</div>
Name | Type | Default | Description |
---|---|---|---|
color | string | "green" | CSS color value of icons |
rate | number | 0 | Current rating value |
readonly | boolean | false | Whether or not to make icons interactive |
scaleDown | number | 0 | Value to shrink icon size |
showTooltip | boolean | true | Whether or not to display value on hover |
total | number | 5 | Max value of rating scale |
Name | Type | Payload | Description |
---|---|---|---|
hoverChange | function | MouseEvent | Function to call when hover event changes |
rateChange | function | number | Function to call when rating value changes |
FAQs
AfroRating is an Angular star rating library using SVG icons.
We found that afrorating demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.