Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
react-credit-calculator
Advanced tools
Using npm
npm i react-credit-calculator@^2.0
import * as React from "react";
import * as Calculator from "react-credit-calculator";
const conditions: Calculator.ControllerProps = {
interestRate: 0.0175, // 1.75% per day
amount: {
min: 500,
max: 2000,
initial: 1000,
step: 50,
},
rate: {
min: 1,
max: 30,
initial: 7,
step: 1,
},
};
return (
<Calculator.Controller {...conditions}>
{/** Controls for amount */}
<Calculator.ControlWrapper type="amount">
<Calculator.Button>
Decrease
</Calculator.Button>
<Calculator.Input />
<Calculator.Button increase>
Increase
</Calculator.Button>
</Calculator.ControlWrapper>
{/** Controls for term */}
<Calculator.ControlWrapper type="term">
<Calculator.Button>
Decrease
</Calculator.Button>
<Calculator.Input />
<Calculator.Button increase>
Increase
</Calculator.Button>
</Calculator.ControlWrapper>
{/** Summary */}
<Calculator.Label type={"term"} />
<Calculator.Label type={"total"} />
<Calculator.DateLabel />
</Calculator.Controller>
);
Using context manually:
import * as React from "react";
import * as Calculator from "react-credit-calculator";
return (
<Calculator.Controller>{/** Include props */}
<Calculator.Context.Consumer>
{(value) => console.log(value) /** do something */}
</Calculator.Context.Consumer>
</Calculator.Controller>
);
see ContextValue for details.
FAQs
Simple credit calculator
The npm package react-credit-calculator receives a total of 7 weekly downloads. As such, react-credit-calculator popularity was classified as not popular.
We found that react-credit-calculator 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.