# js-trim-multiline-string

> easy multiline syntax for javascript

Latest version **1.0.8** (published 2019-05-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install js-trim-multiline-string
pnpm add js-trim-multiline-string
yarn add js-trim-multiline-string
bun add js-trim-multiline-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 | 1.0.8 |
| Published | 2019-05-16 |
| First published | 2019-05-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 28.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | michael dimmitt |
| Maintainers | michaeldimmitt |
| Keywords | js, multiline, trim, string |

## Links

- npm: https://www.npmjs.com/package/js-trim-multiline-string
- Repository: https://github.com/MichaelDimmitt/js-trim-multiline-string
- Homepage: https://github.com/MichaelDimmitt/js-trim-multiline-string#readme
- Issues: https://github.com/MichaelDimmitt/js-trim-multiline-string/issues
- npm.io page: https://npm.io/package/js-trim-multiline-string

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.0.8 (latest) — 2019-05-16
- 1.0.7 — 2019-05-16
- 1.0.6 — 2019-05-15
- 1.0.5 — 2019-05-09
- 1.0.4 — 2019-05-08
- 1.0.3 — 2019-05-08
- 1.0.2 — 2019-05-08
- 1.0.1 — 2019-05-08
- 1.0.0 — 2019-05-08

## README

# js-trim-multiline-string [![Build Status](https://travis-ci.org/sindresorhus/trim-left.svg?branch=master)](https://travis-ci.org/sindresorhus/trim-left)

multiline strings are a pain in javascript.

the most readable multiline string is as follows:

#### Expected Result:
```javascript
"
this
is
a
multiline
string
"
```

#### Before:

```javascript
def multilineStringExample() {
  const  stringConcatenation  = '' +
    'this ' +
    'is' +
    'a' +
    'multiline' +
    'string' +
    '';

  return stringConcatenation;
}
```

#### After:

```javascript
def multilineStringExample() {
  const taggedTemplate = mtrim `
    this
    is
    a
    multiline
    string
  `
  return taggedTemplate
}
```

## Install

```
$ npm install --save trim-multiline-string
```

## FullUsage, (Use the library as a Function, Tagged Template, Prototype Function), If Indent present keep Indent.!

```js
const { mtrim } = require('trim-multiline-string');
console.log(

  mtrim(str),

  mtrim(`str`),

  mtrim`
    check it out!
  `,

  mtrim
    `check it out!`,

  `str`.mtrim()

  `
   Keep Indent
   Implementation
   By Passing Number!
  `.mtrim(3)
)

```

## Related
- [`multiline`](https://github.com/sindresorhus/multiline) - Multiline string using anonymous function, and function call.
- [`trim-newlines`](https://github.com/sindresorhus/trim-newlines) - Similar to `String#trim()` but removes only newlines
- [`trim-right`](https://github.com/sindresorhus/trim-right) - Similar to `String#trim()` but removes only whitespace on the right
- [`trim-off-newlines`](https://github.com/stevemao/trim-off-newlines) - Similar to `String#trim()` but removes only newlines


## License

MIT © [michael_dimmitt](https://michaeldimmitt.github.io/michaeldimmitt/)

## Projects Using mtrim:
https://github.com/MichaelDimmitt/simp-js_term/blob/master/terminal.test.js

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