1.0.2 • Published 4 years ago

text-constant-case v1.0.2

Weekly downloads
68
License
MIT
Repository
github
Last release
4 years ago

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