Package Exports
- microsoft-capitalize
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 (microsoft-capitalize) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
microsoft-capitalize
Sentence-style capitalization in titles and headings based on Microsoft Styleguide.
- Capitalize the first word of a sentence.
- Be possible to omit specific exceptions.
- Use lowercase for everything else.
Install
$ npm install microsoft-capitalize --save
Usage
const capitalize = require('microsoft-capitalize')
capitalize('Microlink CDN: Global Edge Cache')
// => 'Microlink CDN: Global edge cache'
// handling dot corner cases
capitalize('autopilot 2.5')
// => 'Autopilot 2.5'
// passing exceptions
capitalize('JSON+LD & oEmbed', ['oEmbed'])
// => 'JSON+LD & oEmbed'
API
capitalize(input, [exceptions])
input
Required
Type: string
The input string to be capitalize.
exceptions
Type: string[]
A list of words to be excluded.
License
microsoft-capitalize © Kiko Beats, released under the MIT License.
Authored and maintained by Kiko Beats with help from contributors.
kikobeats.com · GitHub Kiko Beats · Twitter @Kikobeats