@beautiful-code/string-utils

Library for manipulating strings.

Usage no npm install needed!

<script type="module">
  import beautifulCodeStringUtils from 'https://cdn.skypack.dev/@beautiful-code/string-utils';
</script>

README

String Utils

This is a simple, string manipulation and comparison library. This is intended to be used imported via Node.js (or a bundler like Webpack for client side).

View On

Installation

Using NPM or Yarn

npm install '@beautiful-code/string-utils'
yard add '@beautiful-code/string-utils'

Usage

Basic Usage

const StringUtils = require('@beautiful-code/string-utils').StringUtils

let example = 'this is a string'
StringUtils.contains('string') // true
example = StringUtils.toCamelCase(example) // thisIsAString

Stream API

const stream = require('@beautiful-code/string-utils').stream

let example = 'this is a string'
example = stream(example).toCamelCase().capitalize().get() // ThisIsAString

const StringStream = require('string-utils').StringStream