2.0.1 • Published 4 years ago

playstring v2.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

1) playstring = Removes all spaces from a string. 2) titleCase = A string which need to be display as a title 3) spaceCase = Function for deviding word with dash "-"

Install

$ npm install playstring

Usage

Function for Removing space from a string (playstring)

const { playstring } = require("playstring");

playstring("Hello world space!");
// output => "Helloworldspace!"

playstring(1337);
//=> Uncaught TypeError: playstring wants a string!
//    at playstring (<anonymous>:2:41)
//    at <anonymous>:1:1

Function for Title string (titleCase)

import { titleCase } from "playstring";
 
titleCase("aPropertyNameWhichNeedsToBeDisplayedAsATitle");
// output => "A Property Name Which Needs To Be Displayed As A Title"

Function for deviding word with dash "-"

import { spaceCase } from "playstring";
 
spaceCase("play string");
// output => "play-string"
 
spaceCase("playString");
// output => "play-string"