snack-string

Generic string functional library for javascript/node.js

Usage no npm install needed!

<script type="module">
  import snackString from 'https://cdn.skypack.dev/snack-string';
</script>

README

Build Status Code Coverage NPM Repo License

snack-string

Generic string functional library for javascript/node.js

Installation

npm install snack-string

Example

var string = require('snack-string');

console.log(string.startsWith('abc', 'a'));

APIs

  • addEnd
  • addStart
  • after
  • afterLast
  • before
  • beforeLast
  • between
  • camelize
  • capitalize
  • classify
  • contains
  • dasherize
  • decapitalize
  • endsWith
  • escapeHTML
  • format
  • hashCode
  • interpolate
  • isBlank
  • isEmpty
  • lines
  • pad
  • padLeft
  • padRight
  • randomString
  • randomNumber
  • randomHex
  • randomBase62
  • removeChars
  • removeEnd
  • removeStart
  • repeat
  • slugify
  • startsWith
  • toCharArray
  • toString
  • template
  • truncate
  • unescapeHTML

License

Released under the Apache 2 License.