Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Str

A simple string helper for NodeJS Project

How to install

npm install @jimuelpalaca/str

Usage

random(len)

import { Str } from '@jimuelpalaca/str';

console.log(Str.random(15));
// => 'dsydbmuesftlbx6'

// By default length is 10
console.log(Str.random())
// => 'uhgbsrzp72'

ucWords(str)

import { Str } from '@jimuelpalaca/str';

const str = 'page title';
console.log(Str.ucWords(str));
// => 'Page Title'

toSlug(str)

import { Str } from '@jimuelpalaca/str';

const str = 'page title';
console.log(Str.toSlug(str));
// => 'page-title';

slugToWord(str)

import { Str } from '@jimuelpalaca/str';

const str = 'page-title';
console.log(Str.slugToWord(str));
// => 'Page Title';

toSnakeCase(str)

import { Str } from '@jimuelpalaca/str';

const str = 'page title';
console.log(Str.toSnakeCase(str));
// => 'page_title';

snakeToWord(str)

import { Str } from '@jimuelpalaca/str';

const str = 'page_title';
console.log(Str.snakeToWord(str));
// => 'Page Title';

About

A String helper for Node js

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages