1.1.14 • Published 1 year ago
to-sentence-case-with-dot v1.1.14
to-sentence-case-with-dot
A JavaScript library which, for each sentence, transforms the first letter to upper case and other letters to lower case.
It appends a dot at the end if not added before.
It recognizes dot .
, question mark ?
and exclamation mark !
as characters ending a sentence.
After the character ending a given sentence, there must be a space.
install
npm install --save to-sentence-case-with-dot
or
yarn add to-sentence-case-with-dot
usage
const toSentenceCaseWithDot = require('to-sentence-case-with-dot').default;
const input = 'loREm IPsum DOLOR sit ameT. consectetur! Adipiscing elit? sed DO eiusmod tempor incididunt';
const result = toSentenceCaseWithDot(input);
expect(result).to.equal('Lorem ipsum dolor sit amet. Consectetur! Adipiscing elit? Sed do eiusmod tempor incididunt.');
In order to see more details, see tests.
1.1.14
1 year ago
1.1.12
1 year ago
1.1.13
1 year ago
1.1.11
2 years ago
1.1.10
2 years ago
1.1.9
3 years ago
1.1.8
3 years ago
1.1.7
3 years ago
1.1.6
3 years ago
1.1.5
3 years ago
1.1.4
3 years ago
1.1.3
3 years ago
1.1.2
3 years ago
1.1.1
3 years ago
1.1.0
3 years ago
1.0.9
4 years ago
1.0.8
4 years ago
1.0.7
4 years ago
1.0.6
4 years ago
1.0.5
4 years ago
1.0.4
4 years ago
1.0.3
4 years ago
1.0.2
4 years ago
1.0.1
4 years ago
1.0.0
4 years ago