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.
#R-Editable x-editable-like component for React.
When clicked, a span
element can turn into two editable fields.
##Input
When clicked the field will be rendered as an input
element, when unfocused or Enter
pressed, the value will be keps in the component and passed to the onChange
function.
const alertMsg = (msg)=> alert(msg)
<REditable value='Change me' onChange={alertMsg.bind(null,'You changed me!')}/>
##Dropdown
When clicked the field will be rendered as a select
element together with its received options
props. When unfocused or Enter
pressed, the value will be keps in the component and passed to the onChange
function.
const myOpt = [
{name:'Apple',value:'apple'},
{name:'Pear',value:'pear'},
{name:'Grape',value:'grape'},
{name:'Banana',value:'banana'},
{name:'Orange',value:'orange'}
]
<REditable type='dropdown' onChange={alertMsg.bind(null,'You changed dropdown')} options={myOpt} />
Note: no styling is provided by default, hence some basic CSS is suggested:
span.r-editable{
font-size: 1em;
width: auto;
border-bottom: 2px dashed red;
}
input.r-editable{
background: #C5F0DA;
font-size: 1em;
border: none;
outline: none;
width: auto;
padding:0;
margin:0;
}
select.r-editable{
font-size: 1em;
background: white;
}
div[id^='re-'] div.examples{
margin-left: 2em;
}
###License ISC
FAQs
Simple editable field for React, supporting several input types
The npm package r-editable receives a total of 1 weekly downloads. As such, r-editable popularity was classified as not popular.
We found that r-editable 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.