Skip to content

Latest commit

 

History

History
39 lines (27 loc) · 680 Bytes

README.md

File metadata and controls

39 lines (27 loc) · 680 Bytes

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