Skip to content

Latest commit

 

History

History
23 lines (16 loc) · 636 Bytes

README.md

File metadata and controls

23 lines (16 loc) · 636 Bytes

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' ]
*/