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

1.0.2 • Public • Published

Camel Case

NPM version NPM downloads Bundle size

Convert into a text with the separator denoted by the next word capitalized.

Installation

npm install text-camel-case --save

Usage

import { camelCase } from "text-camel-case";
 
camelCase("string"); //=> "string"
camelCase("dot.case"); //=> "dotCase"
camelCase("PascalCase"); //=> "pascalCase"
camelCase("camelCase"); //=> "camelCase"
camelCase("version 1.2.3"); //=> "version_1_2_3"

The function also accepts options.

Merge Numbers

If you'd like to remove the behavior prefixing _ before numbers, you can use camelCaseTransformMerge:

import { camelCaseTransformMerge } from "text-camel-case";
 
camelCase("version 123", { transform: camelCaseTransformMerge }); //=> "version123"

License

MIT

/text-camel-case/

    Package Sidebar

    Install

    npm i text-camel-case

    Weekly Downloads

    2,532

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    7.52 kB

    Total Files

    7

    Last publish

    Collaborators

    • dimetrix