constant-case

Transform into upper case string with an underscore between words

MIT 14 个版本
安装
npm install constant-case
yarn add constant-case
pnpm add constant-case
bun add constant-case
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

版本列表
4.0.0 2023-09-30
3.0.4 2020-12-02
3.0.3 2019-12-19
3.0.2 2019-12-06
3.0.1 2019-12-03
3.0.0 2019-12-01
2.0.0 2016-06-12
1.1.2 2015-12-16
1.1.1 2015-05-11
1.1.0 2015-01-12
1.0.0 2014-08-17
0.1.0 2014-04-09
0.0.2 2014-03-25
0.0.1 2014-03-24