
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
react-native-text-truncate
Advanced tools
Display the truncated text with read more and read less
$ npm install react-native-text-truncate --save
Or
$ yarn add react-native-text-truncate
import React,{Component} from 'react';
import TextTruncate from 'react-native-text-truncate';
import {
Text
} from 'react-native';
export default class ImageViewer extends Component {
render() {
return(<TextTruncate
style={{fontSize:16,fontWeight:'200',color:'black'}}
numberOfLines={5}
renderExpandor={this.renderExpandor}
renderCollapsar={this.renderCollapsar}>
<Text>
{'This page will help you install and build your first React Native app. If you already have React Native installed, you can skip ahead to the Tutorial.If you are coming from a web background, the easiest way to get started with React Native is with Expo tools because they allow you to start a project without installing and configuring Xcode or Android Studio. Expo CLI sets up a development environment on your local machine and you can be writing a React Native app within minutes. For instant development, you can use Snack to try React Native out directly in your web browser.If you are familiar with native development, you will likely want to use React Native CLI. It requires Xcode or Android Studio to get started. If you already have one of these tools installed, you should be able to get up and running within a few minutes. If they are not installed, you should expect to spend about an hour installing and configuring them.'}
</Text>
</TextTruncate>)
}
renderExpandor=()=>{
return(<Text>
{'Read More'}
</Text>);
}
renderCollapsar=()=>{
return(<Text>
{'Read Less'}
</Text>);
}
}
Number of lines you want to truncate
Init display as full text.
Animation duration for expansion.
Animation duration for collapsion.
Render expandor when the text is truncated.
Style for expandor container
Active opacity for expandor container touchable
Render collapsar when the text is fully expanded.
Style for collapsar container
Active opacity for collapsar container touchable
The maximum zoom level.
Callback function that is called when the text is expanded.
Callback function that is called when the text is truncated.
Callback function that is called when the expandor is pressed.
Callback function that is called when the collapsar is pressed.
Truncated the text.
Display full text.
FAQs
Display the truncated text with read more and read less
The npm package react-native-text-truncate receives a total of 9 weekly downloads. As such, react-native-text-truncate popularity was classified as not popular.
We found that react-native-text-truncate 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
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.