camelcaseify
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

camelcaseify

A library to convert labels to camel case format.

Installation

Using npm

npm install camelcaseify

Using jsr

npx jsr add @adg/camel-caseify

Usage

Here is an example of how to use camelcaseify in your project:

import { camelCaseify } from 'camelcaseify';


console.log(camelCaseify('hello world')); // Output: helloWorld
console.log(camelCaseify('Hello World')); // Output: helloWorld
console.log(camelCaseify('hello_world')); // Output: helloWorld
console.log(camelCaseify('Hello-World')); // Output: helloWorld
console.log(camelCaseify('some label with spaces')); // Output: someLabelWithSpaces
console.log(camelCaseify('another_example-with-mixed_separators')); // Output: anotherExampleWithMixedSeparators
console.log(camelCaseify(' Leading spaces and symbols')); // Output: leadingSpacesAndSymbols
console.log(camelCaseify('-starting-with-dash')); // Output: startingWithDash
console.log(camelCaseify('123numbers at the start')); // Output: 123NumbersAtTheStart
console.log(camelCaseify('ends with 123numbers')); // Output: endsWith123Numbers

Package Sidebar

Install

npm i camelcaseify

Weekly Downloads

9

Version

1.0.4

License

MIT

Unpacked Size

9.52 kB

Total Files

13

Last publish

Collaborators

  • givtaj