ST Logo

Getting Started

Quick start guide for installing and using string-tuner.

Installation

Install via npm:

npm install string-tuner

If you already have it installed, use this command to get the latest version:

npm install string-tuner@latest

Latest version: 3.0.4

How to use

You can import the entire library or individual modules based on your needs:

Import Everything (Recommended for first-time use)

You can see the full functionality by importing st then hitting a dot (.) to see the full list of functions through intelisense.

import st from 'string-tuner';

// Use all functions through the "st" object
st.camel('hello world');
st.trim('long string', 5);
st.stripHtml('<p>text</p>');
st.mask('1234567890');
st.valid.email('test@example.com');

Import Individual Functions (Recommended for cleaner code)

If you are already familiar with the library, you can import only the functions that you need.

import { camel, trim, stripHtml, mask, valid } from 'string-tuner';

// Use individual functions directly
camel('hello world');
trim('long string', 5);
stripHtml('<p>text</p>');
mask('1234567890');
valid.email('test@example.com');