@subparry/stringutils
v1.0.0
Published
A small class with static methods to handle string manipulation and randomization
Downloads
2
Readme
Stringutils
Description
This is a very small class for string manipulation. I developed it for my own use and DRYness of my projects, so it has very little functionality, however I intend do expand it as needed over time.
Usage
- CommonJS
const Strings = require('stringutils')
- ES6 imports
import Strings from 'stringutils'
- Static methods
Strings.randomize() // Returns a random alphanumeric string of length 10
Strings.randomize(100) // Same but of length 100
Strings.capitalize("hello") // returns "Hello"
Strings.capitalize("") // returns ""
Strings.capitalize(10) // Any non string type throws exception