# concatenater

> Concatenate string

Latest version **0.0.5** (published 2019-12-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install concatenater
pnpm add concatenater
yarn add concatenater
bun add concatenater
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.5 |
| Published | 2019-12-24 |
| First published | 2019-12-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8 |
| Dependencies | 0 |
| Unpacked size | 6.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Wassim lsabbagh |
| Maintainers | lsabbagh |
| Keywords | concatnate, string, str, builder |

## Links

- npm: https://www.npmjs.com/package/concatenater
- Repository: https://github.com/lsabbagh/concatenater
- Homepage: https://github.com/lsabbagh/concatenater#readme
- Issues: https://github.com/lsabbagh/concatenater/issues
- npm.io page: https://npm.io/package/concatenater

## Alternatives

- [@sveltejs/kit](https://npm.io/package/@sveltejs/kit.md) — 2.2M weekly downloads
- [@atlaskit/theme](https://npm.io/package/@atlaskit/theme.md) — 402.0K weekly downloads
- [@tangle-network/brand](https://npm.io/package/@tangle-network/brand.md) — 10.0K weekly downloads
- [seneca](https://npm.io/package/seneca.md) — 7.4K weekly downloads
- [@bsb/base](https://npm.io/package/@bsb/base.md) — 7.2K weekly downloads

## Recent versions

- 0.0.5 (latest) — 2019-12-24
- 0.0.4 — 2019-12-22
- 0.0.3 — 2019-12-21
- 0.0.2 — 2019-12-17
- 0.0.1 — 2019-12-17

## README

# concatenater [![Build Status](https://travis-ci.org/sindresorhus/concatenater.svg?branch=master)](https://travis-ci.org/sindresorhus/concatenater)

## Usage

```js
const concatenater = require('concatenater');
```

## append
```js
concatenater('foo')
	.append('-bar')
	.toString();
//=> foo-bar

concatenater('foo')
	.append('-bar', '-one', '-two')
	.toString();
//=> foo-bar-one-two

concatenater('foo')
	.append('-bar', null, '-two', '-three') // null ignored
	.toString();
//=> foo-bar-two-three

concatenater('foo')
	.append('-bar', undefined, '-two', '-three') // undefiend ignored
	.toString();
//=> foo-bar-two-three

concatenater('foo')
	.append('-bar', false, '-two', '-three') // false ignored and breaks
	.toString();
//=> foo-bar

concatenater('foo')
	.append('-bar', true, '-two', '-three') // true ignored and continue
	.toString();
//=> foo-bar
```

## prepend
```js
concatenater('bar')
	.prepend('foo,')
	.toString();
//=> foo,bar
```

## surround
```js
concatenater('foo,bar')
	.surround('{{', '}}')
	.toString();
//=> {{foor,bar}}
```

## frame
```js
concatenater('foo,bar')
	.frame('((...))')
	.toString();
//=> ((foor,bar))
```
## set
```js
concatenater()
	.set('foo')
	.toString();
//=> foo
```
## replace
```js
concatenater('foo, bar')
	.replace('bar', '--') // 2 inputs
	.toString();
//=> foo, --

concatenater('foo, bar, one, anyKey')
	.replace({ // 1 input
		bar: '----',
		one: 1,
		anyKey: 'anyValue'
	})
	.toString();
//=> foo, ----, 1, anyValue
```

## source
```js
concatenater()
	.source({
		one: 1,
		two: 2
	})
	.set('foo, {one}, {two}')
	.toString();
//=> foo, 1, 2
```

## appendFormat
```js
concatenater()
	.appendFormat('Hello [0] [1] [0]', 'foo', 'bar')
	.toString()
//=> 'Hello foo bar foo'
```

## n
```js
test('newline', t => {
		concatenater()
		.append('Hello')
		.n()
		.append('foo')
		.n(2)
		.append('bar')
		.toString()
		// =>
`Hello
foo

bar`
```

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