Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

microsoft-capitalize

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

microsoft-capitalize

Sentence-style capitalization in titles and headings based on Microsoft Styleguide

  • 1.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

microsoft-capitalize


microsoft-capitalize

Last version Build Status Coverage Status Bundlephobia NPM Status

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

Keywords

FAQs

Package last updated on 17 Dec 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc