node package manager
Stop writing boring code. Discover, share, and reuse within your team. Create a free org »



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


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.


Teasy is released under the MIT license.