@supercharge/strings

String utilities for Node.js and JavaScript

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
@supercharge/strings
3302.0.03 months ago3 years agoMinified + gzip package size for @supercharge/strings in KB

Readme

<img width="471" style="max-width:100%;" src="https://superchargejs.com/images/supercharge-text.svg" />


<h3>Strings</h3>

String utilities for Node.js.


<a href="#installation"><strong>Installation</strong></a> 路
<a href="#Docs"><strong>Docs</strong></a> 路
<a href="#usage"><strong>Usage</strong></a>



<a href="https://www.npmjs.com/package/@supercharge/strings"><img src="https://img.shields.io/npm/v/@supercharge/strings.svg" alt="Latest Version"></a>
<a href="https://www.npmjs.com/package/@supercharge/strings"><img src="https://img.shields.io/npm/dm/@supercharge/strings.svg" alt="Monthly downloads"></a>

<em>Follow <a href="http://twitter.com/marcuspoehls">@marcuspoehls</a> and <a href="http://twitter.com/superchargejs">@superchargejs</a> for updates!</em>

---

Introduction

The @supercharge/strings package provides chainable string utilities for Node.js and JavaScript. It鈥檚 a wrapper around JavaScript鈥檚 global String class providing a handful of useful methods, like .title(), .strip(), .camel(), and so on.

Installation

``` npm i @supercharge/strings ```

Docs

Find all the details for @supercharge/strings in the extensive Supercharge docs.

Usage

Using @supercharge/strings is pretty straightforward. Pass a string to the imported Function and chain your desired methods to transform to string value to your needs. For example, you may want to trim a string and then title-case it: ```js const Str = require('@supercharge/strings') const title = Str(' Supercharge is sweet!').trim().title().get() // title: "Supercharge Is Sweet!" ``` For every method in the chain that would return a string, the package returns an instance of iteself. This way, you can chain further methods. Call .get() to retrieve the actual JavaScript string.

Contributing

Do you miss a string function? We very much appreciate your contribution! Please send in a pull request 馃槉
  1. Create a fork
  1. Create your feature branch: git checkout -b my-feature
  1. Commit your changes: git commit -am 'Add some feature'
  1. Push to the branch: git push origin my-new-feature
  1. Submit a pull request 馃殌

License

MIT 漏 Supercharge ---
superchargejs.com 聽路聽
GitHub @supercharge 聽路聽
Twitter @superchargejs