sentencecase.js
Version:
Convert paragraph into sentence case.
47 lines (32 loc) • 1.17 kB
Markdown
sentencecase.js
========================================
[](https://travis-ci.org/franklingu/sentencecase)
[](https://codecov.io/gh/franklingu/sentencecase)
[](https://npmjs.org/package/sentencecase.js)
[](https://npmjs.org/package/sentencecase.js)
Small and fast library to convert a paragraph to [sentence case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
### Installation
~~~
$ npm install --save sentencecase.js
~~~
or
~~~
$ yarn add sentencecase.js
~~~
### Usage
~~~
const toSentenceCase = require("sentencecase.js");
const paragraph = 'she\'s a cOOl person. dogs ARE loyal Friends! Aren\'t tHEy? pErIoD.';
console.log(toSentenceCase(paragraph));
// She's a cool person. Dogs are loyal friends! Aren't they? Period.
~~~
### Testing
~~~
npm test
~~~
or
~~~
yarn test
~~~
### LICENSE
[MIT](./LICENSE)