Skip to content

joshtronic/luthier

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 

luthier

noun (lu·thi·er)

one who makes stringed musical instruments (such as violins or guitars)

luthier handles all of your string needs. 🎸

License Node Version Test Status Code Coverage

Installation

npm install luthier --save
# or
yarn add luthier

Usage

import { luthier } from 'luthier';

Functions

camelCase

luthier.camelCase('your string');
// 'yourString'

constantCase

luthier.constantCase('your string');
// 'YOUR_STRING'

containsLetters

luthier.containsLetters('your string');
// true

containsLowerCasedLetters

luthier.containsLowerCasedLetters('your string');
// true

containsNumbers

luthier.containsNumbers('your string');
// false

containsOnlyLetters

luthier.containsLetters('your string');
// false

containsOnlyLowerCasedLetters

luthier.containsOnlyLowerCasedLetters('your string');
// false

containsOnlyNumbers

luthier.containsOnlyNumbers('your string');
// false

containsOnlySpecialCharacters

luthier.containsOnlySpecialCharacters('your string');
// false

containsOnlyUpperCasedLetters

luthier.containsOnlyUpperCasedLetters('your string');
// false

containsSpecialCharacters

luthier.containsSpecialCharacters('your string');
// true

containsUpperCasedLetters

luthier.containsUpperCasedLetters('your string');
// false

countLines

luthier.countLines('your\nstring');
// 2

countWords

luthier.countWords('your string');
// 2

customCase

luthier.customCase('+', 'your string');
// 'your+string'

dotCase

luthier.dotCase('your string');
// 'your.string'

flip

luthier.flip('your string');
// 'ɓuᴉɹʇs ɹnoʎ'

initials

luthier.initials('your string');
// 'YG'

isCamelCased

luthier.isCamelCased('your string');
// false

isCapitalized

luthier.isCapitalized('your string');
// false

isConstantCased

luthier.isConstantCased('your string');
// false

isDotCased

luthier.isDotCased('your string');
// false

isKebabCased

luthier.isKebabCased('your string');
// false

isLowerCased

luthier.isKebabCased('your string');
// true

isPascalCased

luthier.isPascalCased('your string');
// false

isSnakeCased

luthier.isSnakeCased('your string');
// false

isStartCased

luthier.isStartCased('your string');
// false

isStudlyCapped

luthier.isStudlyCapped('your string');
// false

isUpperCased

luthier.isUpperCased('your string');
// false

kebabCase

luthier.kebabCase('your string');
// 'your-string'

lowerCaseFirst

luthier.lowerCaseFirst('Your string');
// 'your string'

lowerCaseWords

luthier.lowerCaseWords('Your String');
// 'your string'

numeronym

luthier.numeronym('your string');
// 'y8g'

pascalCase

luthier.pascalCase('your string');
// 'YourString'

random

luthier.random(10);
// 'psifnwkflr'

reverse

luthier.reverse('your string');
// 'gnirts ruoy'

rot13

luthier.rot13('your string');
// 'lbhe fgevat'

shuffle

luthier.shuffle('your string');
// 'nru grsioty'

snakeCase

luthier.snakeCase('your string');
// 'your_string'

startCase

luthier.startCase('your string');
// 'Your String'

stripTags

luthier.stripTags('<em>your string</em>');
// 'your string'

studlyCaps

luthier.studlyCaps('your string');
// 'YoUr StRiNg'

upperCaseFirst

luthier.upperCaseFirst('your string');
// 'Your string'

upperCaseWords

luthier.upperCaseWords('your string');
// 'Your String'

Unlike startCase, the upperCaseWords method does not apply String.prototype.toLowerCase() first.

License

MIT

About

Luthier aims to handle all of your string needs. 🎸

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published