0.1.0 • Published 6 years ago

@theomjones/stringlib v0.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

stringlib - a small JS string library for the browser and Node (WIP).

build status

Install

yarn add stringlib
# OR
npm install stringlib --save

Usage

//ES6
import s from 'stringlib';

// Node
const s = require('stringlib');

API

// Assert input is a string.
str.assertString(String);

// Capitalize the first letter of a string.
str.capitalize(String);

// Uncapitalize the first letter of a string.
str.uncapitalize(String);

// Reverse a string
str.reverse(String);

// Turn a string into a slug
str.slugify(String);

// Turn a string into a title
// e.g. the lion the witch and the wardrobe => The Lion the Witch and the Wardrobe
str.titleize(String);