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.132
1.1.121
1.1.110
1.1.100
1.1.95
1.1.82
1.1.70
1.1.60
1.1.53
1.1.40
1.1.34
1.1.21
1.1.14
1.1.00
1.0.92
1.0.82
1.0.71
1.0.61
1.0.52
1.0.44
1.0.33
1.0.20
1.0.14
1.0.01

Package Sidebar

Install

npm i to-sentence-case-with-dot

Weekly Downloads

43

Version

1.1.14

License

MIT

Unpacked Size

3.84 kB

Total Files

4

Last publish

Collaborators

  • oprogramador