@abdulrehman7007/string-utils-js

1.0.1 • Public • Published

String Utils

npm version Build Status License

A comprehensive string manipulation library for JavaScript, providing a variety of functions for common string operations such as capitalization, camel casing, snake casing, and more.

Features

  • capitalize: Capitalizes the first letter of a string.
  • camelCase: Converts a string to camelCase.
  • snakeCase: Converts a string to snake_case.
  • kebabCase: Converts a string to kebab-case.
  • titleCase: Converts a string to Title Case.
  • reverseString: Reverses the characters in a string.

Installation

Install the package via npm:

npm install @abdulrehman7007/string-utils-js

npm-string-package Usage

const {
  capitalize,
  camelCase,
  snakeCase,
  kebabCase,
  titleCase,
  reverseString,
} = require("@abdulrehman7007/string-utils-js");

// Example usage of string-utils functions
const capitalizedString = capitalize("hello world"); // 'Hello world'
const camelCasedString = camelCase("hello world"); // 'helloWorld'
const snakeCasedString = snakeCase("hello world"); // 'hello_world'
const kebabCasedString = kebabCase("hello world"); // 'hello-world'
const titleCasedString = titleCase("hello world"); // 'Hello World'
const reversedString = reverseString("hello world"); // 'dlrow olleh'

Package Sidebar

Install

npm i @abdulrehman7007/string-utils-js

Weekly Downloads

7

Version

1.0.1

License

ISC

Unpacked Size

4.88 kB

Total Files

4

Last publish

Collaborators

  • abdulrehman7007