1.0.0 • Published 4 years ago

@subparry/stringutils v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

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