# tsml

> ES6 template string tag for multi-line cleaning - squash multi-line strings into a single line

Latest version **1.0.1** (published 2015-07-10) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

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

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2015-07-10 |
| First published | 2015-03-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 37 |
| Author | Rod Vagg |
| Maintainers | rvagg |
| Keywords | template, templatestring, es6 |

## Links

- npm: https://www.npmjs.com/package/tsml
- Repository: https://github.com/rvagg/tsml
- Issues: https://github.com/rvagg/tsml/issues
- npm.io page: https://npm.io/package/tsml

## 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.1 (latest) — 2015-07-10
- 1.0.0 — 2015-03-29

## README

# tsml

**ES6 template string tag for multi-line cleaning - squash multi-line strings into a single line**

Use template strings to split up complex string creation over multiple lines and have the newlines and newline white-space prefixes cleaned for you.

`tsml` is primarily for code readability. Split up template strings over newlines, indent or add additional blank lines to space things out.

## Example

From [changelog-maker](https://github.com/rvagg/changelog-maker):

```js
const tsml = require('tsml')

function toStringSimple (data) {
  return tsml`

    * [${data.sha.substr(0, 10)}] - 
    ${data.semver.length ? '(' + data.semver.join(', ').toUpperCase() + ') ' : ''}
    ${data.revert ? 'Revert "' : ''}
    ${data.group ? data.group + ': ' : ''}
    ${data.summary} 
    ${data.revert ? '"' : ''}
    ${data.author ? '(' + data.author + ') ' : ''}
    ${data.pr}

  `
}

// -> * [7e88a9322c] - src: make accessors immune to context confusion (Ben Noordhuis) #1238
```

## License

**tsml** is Copyright (c) 2015 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licenced under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE.md file for more details.

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