teasy

1.0.0 • Public • Published

Teasy

Takes a big chunk of text and turns it into a shorter teaser by breaking up sentences.

Usage

var teasy = require('teasy');
var myLongText = '...'; // <- actual long text
var teaser = teasy(myLongText);

The teasy function takes too additional arguments if you want to customize the output.

teasy(text, soft, hard)

  • soft, the soft limit. We'll try to cut off the teaser around this number.
  • hard, the hard limit. If the teaser ends up being longer then this number the text is cut and an ellipsis is appended.

The defaults are 256 and 512 respectively.

License

Teasy is released under the MIT license.

Readme

Keywords

Package Sidebar

Install

npm i teasy

Weekly Downloads

5

Version

1.0.0

License

MIT

Last publish

Collaborators

  • simme