1.1.1 • Published 3 years ago

@gravitywelluk/string-manipulation v1.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Table of Contents

Usage

import { <LIB_NAME_HERE> } from "@gravitywelluk/string-manipulation";

punctuate

Checks if the given string has the request punctuation mark and adds it to the string if it does not.

import { punctuate, PunctuationMark } from "@gravitywelluk/string-manipulation";

punctuate("The quick brown fox jumps over the lazy dog", PunctuationMark.FULL_STOP);
// Output: "The quick brown fox jumps over the lazy dog."

sentenceCase

Converts a strings 1st letter to uppercase

import { sentenceCase } from "@gravitywelluk/string-manipulation";

sentenceCase("the fox JUMPED over Brian's lazy dog");
// Output: "The fox JUMPED over Brian's lazy dog"

slurlgify

Converts the given slug into a slugified URL

import { slurlgify } from "@gravitywelluk/string-manipulation";

slurlgify("the fox JUMPED over Brian's lazy dog & cat + mouse");
// Output: "the-fox-jumped-over-brians-lazy-dog-and-cat-plus-mouse"

titleCase

Converts the given sentence string into title case

import { titleCase } from "@gravitywelluk/string-manipulation";

titleCase("the fox JUMPED over brian's lazy dog");
// Output: "The Fox Jumped over Brian's Lazy Dog"
1.1.1

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago