You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

str-kit-kp

Package Overview
Dependencies
Maintainers
0
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

str-kit-kp

A utility package for advanced string manipulations such as capitalization, camelCase conversion, kebab-case, trimming, and more.

2.0.3
latest
Source
npmnpm
Version published
Maintainers
0
Created
Source

str-kit-kp

str-kit-kp is a simple and easy-to-use package providing utility functions for string manipulation. It includes functions for capitalizing letters, converting strings to camelCase, kebab-case, and more.

Installation

This is a Node.js module available through the npm registry.

Before installing, download and install Node.js. Node.js 0.10 or higher is required.

If this is a brand new project, make sure to create a package.json first with the npm init command.

Installation is done using the npm install command:

$ npm install str-kit-kp

Follow our installing guide for more information.

Features

  • Capitalize the first letter of a string
  • Convert a string to camelCase
  • Trim leading/trailing whitespace
  • Replace spaces with underscores
  • Convert a string to kebab-case

Docs & Community

Quick Start

To get started with str-kit-kp, follow these steps:

Install the executable. The executable's major version will match Express's:

$ npm install str-kit-kp
//In JavaScript
const strKit = require('str-kit-kp');
const result = strKit.capitalizeFirstLetter('hello world');
console.log(result); // Output: 'Hello world'
//In TypeScipt
import * as strKit from 'str-kit-kp';

const result: string = strKit.capitalizeFirstLetter('hello world');
console.log(result); // Output: 'Hello world'

const camelCaseResult: string = strKit.toCamelCase('hello world');
console.log(camelCaseResult); // Output: 'helloWorld'

const trimmedResult: string = strKit.trimWhitespace('  some text  ');
console.log(trimmedResult); // Output: 'some text'

const underscoredResult: string = strKit.replaceSpacesWithUnderscores('hello world');
console.log(underscoredResult); // Output: 'hello_world'

const kebabCaseResult: string = strKit.toKebabCase('Hello World');
console.log(kebabCaseResult); // Output: 'hello-world'

const capitalizeEveryLetterResult: string = strKit.capitalizeEveryLetter('hello world');
console.log(capitalizeEveryLetterResult); // Output: 'HELLO WORLD'

Keywords

string

FAQs

Package last updated on 31 Jan 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts