Skip to content

A collection of JavaScript string helper functions. Released as npm package at @harikotha/stringkit

Notifications You must be signed in to change notification settings

harireddy7/stringkit

Repository files navigation

stringkit

A collection of JavaScript string helper functions 🌟

Functions

1. titleCase

const title = titleCase('the witcher'); // The Witcher
const title = titleCase('brooklyn nine-nine   '); // Brooklyn Nine-nine

2. reverse

const text = reverse('geralt'); // tlareg
const text = reverse('have a good-day  '); // '  yad doog a evah'

3. reepat

const text = repeat('*', 5) // *****
const text = repeat('cool', 3) // coolcoolcool
const text = repeat('hey', 0) // ''

Installation

stringkit requires node.js v18 to run

git clone https://github.com/harireddy7/stringkit.git

cd stringkit
yarn install

yarn build