JSPM

text-constant-case

1.2.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3676
  • Score
    100M100P100Q122742F
  • License MIT

Convert into upper case text with an underscore between words

Package Exports

  • text-constant-case
  • text-constant-case/dist.es2015/index.js
  • text-constant-case/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (text-constant-case) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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