# dedent.macro

> A babel-macro for dedenting template strings

Latest version **0.1.0** (published 2018-09-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install dedent.macro
pnpm add dedent.macro
yarn add dedent.macro
bun add dedent.macro
```

## 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.1.0 |
| Published | 2018-09-10 |
| First published | 2018-09-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Haroen Viaene |
| Maintainers | haroenv |

## Links

- npm: https://www.npmjs.com/package/dedent.macro
- Repository: https://github.com/Haroenv/dedent.macro
- Homepage: https://github.com/Haroenv/dedent.macro#readme
- Issues: https://github.com/Haroenv/dedent.macro/issues
- npm.io page: https://npm.io/package/dedent.macro

## Recent versions

- 0.1.0 (latest) — 2018-09-10

## README

# dedent.macro

A [babel macro](https://github.com/kentcdodds/babel-plugin-macros) for [dedent](https://yarn.pm/dedent)

## Usage

### Setting up babel macros

```
yarn add babel-plugin-macros
```

**.babelrc**

```
{
  "plugins": ["macros"]
}
```

See more info in the [main documentation](https://github.com/kentcdodds/babel-plugin-macros/blob/master/other/docs/user.md)

### Setting up `dedent.macro`

```
yarn add --dev dedent.macro
```

```js
import dedent from 'dedent.macro'

    dedent`
    hi there
    this is fine
    `
```

This will transform out the leading spaces, just like regular Dedent usage would, but with the difference being that the dedent call will be transformed out completely during the babel process.

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