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

1.0.2 • Public • Published

Constant Case

NPM version NPM downloads Bundle size

Transform into upper case text with an underscore between words

Installation

npm install text-constant-case --save

Usage

import { constantCase } from "text-constant-case";
 
constantCase("string"); //=> "STRING"
constantCase("dot.case"); //=> "DOT_CASE"
constantCase("PascalCase"); //=> "PASCAL_CASE"
constantCase("camelCase"); //=> "CAMEL_CASE"
constantCase("version 1.2.3"); //=> "VERSION_1_2_3"

The function also accepts options.

License

MIT

Package Sidebar

Install

npm i text-constant-case

Weekly Downloads

1,982

Version

1.0.2

License

MIT

Unpacked Size

6.26 kB

Total Files

7

Last publish

Collaborators

  • dimetrix