Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@subparry/stringutils

subparry3ISC1.0.0

A small class with static methods to handle string manipulation and randomization

strings, utils, random, id

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 `javascript 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 `