# @brook/strbuf

> concat javascript string in es6 way

Latest version **1.0.2** (published 2018-03-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install @brook/strbuf
pnpm add @brook/strbuf
yarn add @brook/strbuf
bun add @brook/strbuf
```

## 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 | 1.0.2 |
| Published | 2018-03-30 |
| First published | 2017-11-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Brook Yang |
| Maintainers | brook |
| Keywords | javascript, string, concat |

## Links

- npm: https://www.npmjs.com/package/@brook/strbuf
- Repository: https://github.com/yangg/strbuf
- Homepage: https://github.com/yangg/strbuf#readme
- Issues: https://github.com/yangg/strbuf/issues
- npm.io page: https://npm.io/package/@brook/strbuf

## Alternatives

- [@mce/gif](https://npm.io/package/@mce/gif.md) — 2.6K weekly downloads
- [cleanse](https://npm.io/package/cleanse.md) — 173 weekly downloads
- [str](https://npm.io/package/str.md) — 127 weekly downloads
- [naming](https://npm.io/package/naming.md) — 95 weekly downloads
- [tap-telco-api](https://npm.io/package/tap-telco-api.md) — 19 weekly downloads

## Recent versions

- 1.0.2 (latest) — 2018-03-30
- 1.0.1 — 2017-11-14

## README

# strbuf

[![Build Status](https://travis-ci.org/yangg/strbuf.svg?branch=master)](https://travis-ci.org/yangg/strbuf) [![Code Climate](https://codeclimate.com/github/yangg/strbuf/badges/gpa.svg)](https://codeclimate.com/github/yangg/strbuf)

Concat javascript string in es6 way, and more!

## Usage

Given:

```js
var json = {
  msg: "foo",
  info: { bar: 'hello'},
  list: [
    { name: 'a', date: '2016/7'},
    { name: 'b', date: '2016/8'},
  ]
};
```
Expect:
#### Using as a function
```js
strbuf('hello, ${msg}, ${info.bar}', json);
strbuf('hello, {0}, {1}', 'foo', 'hello');
```

#### Using as a class
```js
var html = new strbuf('<ul>');
html.push('<li>${msg}-${info.bar}</li>', json)
  .push('<li>{0}-{1}</li>', 'foo', 'hello');
html.pushArray('<li>${name} - ${date}</li>', json.list);
html.toString();
```

## License
MIT

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