JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4266817
  • Score
    100M100P100Q55828F
  • License MIT

Sentence case a string

Package Exports

  • sentence-case

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (sentence-case) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Sentence Case

NPM version NPM downloads Build status Test coverage

Sentence case a string. Optional locale and replacement character supported.

Supports Unicode (non-ASCII characters) and non-string entities, such as objects with a toString property, numbers and booleans. Empty values (null and undefined) will result in an empty string.

Installation

npm install sentence-case --save

Usage

var sentenceCase = require('sentence-case')

sentenceCase(null)              //=> ""
sentenceCase('string')          //=> "string"
sentenceCase('dot.case')        //=> "dot case"
sentenceCase('camelCase')       //=> "camel case"
sentenceCase('Beyoncé Knowles') //=> "beyoncé knowles"

sentenceCase('A STRING', 'tr') //=> "a strıng"

sentenceCase('HELLO WORLD!', null, '_') //=> "hello_world"

License

MIT