🚀 DAY 5 OF LAUNCH WEEK:Introducing Webhook Events for Alert Changes.Learn more →
Socket
Book a DemoInstallSign in
Socket

ellipsisis

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ellipsisis

Truncates text string at spaces, then adds ellipsis at the end.

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

ellipsisis

This is a simple function for truncating text. Pass a string and max number of characters, and receive a string that ends with ellipsis. This function doesn't cut off a word, only truncates at a space.

Installation

$ npm install ellipsisis

Usage

const ellipsisis = require('ellipsisis');
console.log(ellipsisis('Hello world's end is coming to an end!',12));
// Hello world ...

console.log(ellipsisis('Hello world's end is coming to an end!',12,'***'));
// Hello world***

Keywords

javascript

FAQs

Package last updated on 14 Apr 2016

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