Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
react-numeral-input
Advanced tools
It is a very tiny component which is a replacement of HTML input element for post-editing format of number values.
ex. 1000000 -> 1,000,000
npm install react-numeral-input
// replace original input from
<input value={this.state.numeralVal} className="" placeholder="" onChange={this.onChange} />
// like this
<NumeralInput value={this.state.numeralVal} className="" placeholder="" onChange={this.onChange} />
let NumeralInput = require('react-numeral-input');
module.exports = React.createClass({
getInitialState() {
return {
numeralVal: 1000000
}
},
onChange(val){
this.setState( {numeralVal:val});
},
render() {
return (
<NumeralInput
value={this.state.numeralVal}
className="form-control"
placeholder=""
onChange={this.onChange} />
)
}
});
You can set any original input props. such as minlength, maxlength. For example:
<NumeralInput value={this.state.numeralVal} className="" placeholder="" onChange={this.onChange} minLength={2} maxLength={10}/>
Default: "0,0"
It is passed to configure numeral format, You can find more information from Numeral.js.
Callback when value is changed, you will receieve unformated number (1000000 instead of 1,000,000).
FAQs
react numeral input
The npm package react-numeral-input receives a total of 8 weekly downloads. As such, react-numeral-input popularity was classified as not popular.
We found that react-numeral-input 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’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.