constant-case-strings
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

Constant Case Strings

Constant case a string (digits will be glued).

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 constant-case-strings --save

Usage

var constantCaseStrings = require('constant-case-strings')
 
constantCaseStrings('string')        //=> "STRING"
constantCaseStrings('camelCase')     //=> "CAMEL_CASE"
constantCaseStrings('sentence case') //=> "SENTENCE_CASE"
 
constantCaseStrings('sentence case12') //=> "SENTENCE_CASE12"
constantCaseStrings('sentence case12order') //=> "SENTENCE_CASE12_ORDER"
 
 

License

MIT

Package Sidebar

Install

npm i constant-case-strings

Weekly Downloads

1

Version

2.0.0

License

MIT

Last publish

Collaborators

  • sericaia