sentence-case

2018-11-09 admin

sentence-case是什么

什么是sentence-case,Sentence case a string

sentence-case使用教程帮助文档

Sentence Case

NPM version NPM downloads Build status Test coverage Greenkeeper badge

Sentence case a string. Explicitly adds a space between groups of numbers to maintain readability and reversibility (E.g. 1.20.5 becomes 1 20 5, not 1205), by default.

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

Node

npm install sentence-case --save

Usage

var sentenceCase = require('sentence-case')

sentenceCase('string')         //=> "String"
sentenceCase('dot.case')       //=> "Dot case"
sentenceCase('PascalCase')     //=> "Pascal case"
sentenceCase('version 1.2.10') //=> "Version 1 2 10"

sentenceCase('STRING 1.2', 'tr') //=> "Strıng 1 2"

Typings

Includes a TypeScript definition.

License

MIT

本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处。

转载请注明:文章转载自 JavaScript中文网 [https://www.javascriptcn.com]

本文地址:https://www.javascriptcn.com/read-44996.html

文章标题:sentence-case

回到顶部