# reassemble-string

> My slick module

Latest version **2.0.0** (published 2015-06-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install reassemble-string
pnpm add reassemble-string
yarn add reassemble-string
bun add reassemble-string
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2015-06-07 |
| First published | 2015-05-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Christoph Hermann |
| Maintainers | schtoeffel |

## Links

- npm: https://www.npmjs.com/package/reassemble-string
- Repository: https://github.com/stoeffel/reassemble-string
- Issues: https://github.com/stoeffel/reassemble-string/issues
- npm.io page: https://npm.io/package/reassemble-string

## Recent versions

- 2.0.0 (latest) — 2015-06-07
- 1.0.3 — 2015-05-13
- 1.0.2 — 2015-05-12
- 1.0.1 — 2015-05-12
- 1.0.0 — 2015-05-12

## README

[![Coverage Status](https://coveralls.io/repos/stoeffel/reassemble-string/badge.svg?branch=master)](https://coveralls.io/r/stoeffel/reassemble-string?branch=master)
[![Build Status](https://travis-ci.org/stoeffel/reassemble-string.svg?branch=master)](https://travis-ci.org/stoeffel/reassemble-string)
[![Dependency Status](https://david-dm.org/stoeffel/reassemble-string.svg)](https://david-dm.org/stoeffel/reassemble-string)
[![npm version](https://badge.fury.io/js/reassemble-string.svg)](http://badge.fury.io/js/reassemble-string)
[![Stability: stable](https://img.shields.io/badge/stability-stable-green.svg)](https://nodejs.org/api/documentation.html#documentation_stability_index)

> Splits a string (Splitchars: _, -, \s, ., or camelcase) and combines it using a combound function. This is usefull to create functions like `camelize`, `dasherize`...


## Install

```
$ npm install --save reassemble-string
```


## Usage

```js
var reassembleString = require('reassemble-string');

const camelize = reassembleString((a, b) => a + b.toUpperCase());
const dasherize = reassembleString((a, b) => `${a}-${b}`);

camelize('hello-world');   // => "helloWorld"
camelize('hello_world');   // => "helloWorld"
camelize('hello.world');   // => "helloWorld"
camelize('hello - world'); // => "helloWorld"
camelize('hello + world'); // => "hello + world"
dasherize('hello world'); // => "hello-world"
dasherize('helloWorld'); // => "hello-world"
```


## API

### reassembleString(combine) -> (string) 
### reassembleString(combine, string)

#### combine

*Required*  
Type: `function(a, b)`

`a` is the last character of the previous word.
`b` is the first character of the next word lowercased.

You should return a string.


#### string

Type: `string`  

The string which gets splitted and reassembled.


## License

MIT © [Christoph Hermann](http://schtoeffel.ch)

---
_Source: https://npm.io/package/reassemble-string · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
