@henrikdk/spagettostring

1.1.2 • Public • Published

spagettoString

Is a small package that revovles around modifying, check and create complicated strings for ease of actions.

How to install

npm i @henrikdk/spagettostring

How to use

const spagettoString = require('@henrikdk/spagettoString');

spagettoString.strReverse('Hej');
//Output: "jeH"

spagettoString.strSort('Strawberries Raspberries Apple Blueberries Kiwifruit Passionfruit', "asc");
//Output: "Apple Blueberries Kiwifruit Passionfruit Raspberries Strawberries"

spagettoString.strCompare('this apple is an beautifull apple', "apple");
//Output: "2"

Functions

  • strReverse - Reverse the string.
  • strSort - Sort string by ascending or descending.
  • strCompare - Find how many instances of a word exist in a string.

Package Sidebar

Install

npm i @henrikdk/spagettostring

Weekly Downloads

2

Version

1.1.2

License

MIT

Unpacked Size

2.5 kB

Total Files

3

Last publish

Collaborators

  • henrikdk