to-sentence-case-with-dot

1.1.14 • Public • Published

to-sentence-case-with-dot

MIT License Build Status

NPM status

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.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.1.141latest

Version History

VersionDownloads (Last 7 Days)Published
1.1.141
1.1.130
1.1.120
1.1.110
1.1.100
1.1.91
1.1.80
1.1.70
1.1.60
1.1.50
1.1.40
1.1.30
1.1.20
1.1.10
1.1.00
1.0.91
1.0.80
1.0.70
1.0.60
1.0.50
1.0.40
1.0.30
1.0.21
1.0.10
1.0.00

Package Sidebar

Install

npm i to-sentence-case-with-dot

Weekly Downloads

4

Version

1.1.14

License

MIT

Unpacked Size

3.84 kB

Total Files

4

Last publish

Collaborators

  • oprogramador