An open API service indexing awesome lists of open source software.

https://github.com/subchen/snack-string

Generic string functional library for javascript/node.js
https://github.com/subchen/snack-string

Last synced: 5 months ago
JSON representation

Generic string functional library for javascript/node.js

Awesome Lists containing this project

README

          

[![Build Status](https://travis-ci.org/subchen/snack-string.svg?branch=master)](https://travis-ci.org/subchen/snack-string)
[![Code Coverage](https://img.shields.io/coveralls/subchen/snack-string/master.svg)](https://coveralls.io/r/subchen/snack-string)
[![NPM Repo](https://img.shields.io/npm/v/snack-string.svg)](https://www.npmjs.com/package/snack-string)
[![License](http://img.shields.io/badge/License-Apache_2-red.svg?style=flat)](http://www.apache.org/licenses/LICENSE-2.0)

# snack-string

Generic string functional library for javascript/node.js

# Installation

```shell
npm install snack-string
```

# Example

```js
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](http://www.apache.org/licenses/LICENSE-2.0).