New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-truncate-string

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-truncate-string

> Truncate strings like butter.

latest
Source
npmnpm
Version
1.3.0
Version published
Maintainers
1
Created
Source

React Truncate String

Truncate strings like butter.

Build Status

Features

It truncates long long long long...long long strings in the middle!

demo: https://albinotonnina.github.io/react-truncate-string

🚀 ultra-blazingly-fast

🌈 ultra-light: 1.76 KB

Table of Contents

Install

yarn add react-truncate-string

Usage

Truncate in the middle of the string

import Truncate from 'react-truncate-string'

...

render(){

    return  <TruncateString text="your long string" />
}

Demos

https://albinotonnina.github.io/react-truncate-string

https://codesandbox.io/s/xvv9r5ozo

Maintainers

@albinotonnina

Contribute

PRs accepted.

TODO

  • truncate by words?
  • min start and end characters option?
  • change debounce time with option?

License

MIT © 2018 Albino Tonnina

Keywords

react

FAQs

Package last updated on 27 Aug 2018

Did you know?

Socket

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.

Install

Related posts