Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
react-native-icon-badge
Advanced tools
Icon badge is used to create icon badge on some element, such as avatar, icon, image.... The badge is used to give some alert to user of specific element.
For example:
Install package:
npm install --save react-native-icon-badge
Import to your app:
...
import IconBadge from 'react-native-icon-badge';
...
Use the component:
<View style={{flexDirection: 'row',alignItems: 'center',justifyContent: 'center',}}>
<IconBadge
MainElement={
<View style={{backgroundColor:'#489EFE',
width:50,
height:50,
margin:6
}}/>
}
BadgeElement={
<Text style={{color:'#FFFFFF'}}>1</Text>
}
IconBadgeStyle={
{width:30,
height:30,
backgroundColor: '#FF00EE'}
}
/>
</View>
API table
API name | Usage |
---|---|
MainElement | The background element. |
BadgeElement | The badge element, nomally it is a Text. |
IconBadgeStyle | Customrized badge style.(Optional) |
IconBadge: {
position:'absolute',
top:1,
right:1,
width:20,
height:20,
borderRadius:15,
alignItems: 'center',
justifyContent: 'center',
backgroundColor: '#FF0000'
}
FAQs
add icon badge to other element for React Native
The npm package react-native-icon-badge receives a total of 887 weekly downloads. As such, react-native-icon-badge popularity was classified as not popular.
We found that react-native-icon-badge 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 found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.