Generic string functional library for javascript/node.js
JavaScript
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
test
.gitignore
.jsbeautifyrc
.jscsrc
.jshintrc
.npmignore
.travis.yml
Gruntfile.js
LICENSE
README.md
index.js
package.json

README.md

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.