Join an array of sentences, adding punctuation when missing.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.babelrc
.gitignore
.npmignore
.prettierignore
.prettierrc
LICENSE
README.md
package-lock.json
package.json

README.md

join-sentences

$ npm install --save join-sentences
import joinSentences from 'join-sentences';
// const joinSentences = require('join-sentences');

const sentencesArray = [
  'Will it ever stop?',
  "Yo, I don't know",
  "Turn off the lights and I'll glow!",
  'To the extreme, I rock a mic like a vandal,',
  'light up a stage and wax a chump like a candle',
];

console.log(joinSentences(sentencesArray));
// => Will it ever stop? Yo, I don't know. Turn off the lights and I'll glow! To the extreme, I rock a mic like a vandal, light up a stage and wax a chump like a candle.