playstring
v2.0.1
Published
Removes all spaces from a string and other string functions are under development
Downloads
1
Maintainers
Readme
- playstring = Removes all spaces from a string.
- titleCase = A string which need to be display as a title
- 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"