twitter-splitter
v1.0.0
Published
Split your text into Twitter-friendly pieces
Downloads
12
Maintainers
Readme
twitter-splitter
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' ]
*/