Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

constant-case

blakeembrey34.7mMITdeprecated4.0.0TypeScript support: included

Use change-case

Transform into upper case string with an underscore between words

constant, case, upper, uppercase, underscore, convert, transform

readme

Constant Case

Transform into upper case string with an underscore between words.

Installation

npm install constant-case --save

Usage

import { constantCase } from "constant-case";

constantCase("string"); //=> "STRING"
constantCase("dot.case"); //=> "DOT_CASE"
constantCase("PascalCase"); //=> "PASCAL_CASE"
constantCase("version 1.2.10"); //=> "VERSION_1_2_10"

The function also accepts options.

License

MIT