Skip to content

pnevares/twitter-splitter

Repository files navigation

twitter-splitter

Build Status npm

Split your text into Twitter-friendly pieces

Usage:

const twitterSplitter = require("twitter-splitter");
const limit = 25;
const joiner = '...';

const text = twitterSplitter("This is a short tweet with a very short character limit", limit, joiner);

console.log(text);

/*
[ 'This is a short tweet...',
  '...with a very short...',
  '...character limit' ]
*/

About

Split your text into Twitter-friendly pieces

Resources

License

Stars

Watchers

Forks

Packages

No packages published