# jstransformer-highlight

> Highlight.js support for JSTransformers.

Latest version **2.0.0** (published 2018-06-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install jstransformer-highlight
pnpm add jstransformer-highlight
yarn add jstransformer-highlight
bun add jstransformer-highlight
```

## 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 | 2.0.0 |
| Published | 2018-06-01 |
| First published | 2015-02-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4 |
| Dependencies | 2 |
| Unpacked size | 4.1 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 8 |
| Author | JSTransformers Team |
| Maintainers | calebeby, forbeslindesay, hemanth, robloach, stoeffel, timothygu |
| Keywords | jstransformer |

## Links

- npm: https://www.npmjs.com/package/jstransformer-highlight
- Repository: https://github.com/jstransformers/jstransformer-highlight
- Homepage: https://github.com/jstransformers/jstransformer-highlight#readme
- Issues: https://github.com/jstransformers/jstransformer-highlight/issues
- npm.io page: https://npm.io/package/jstransformer-highlight

## Dependencies (2)

- [escape-html](https://npm.io/package/escape-html.md) ^1.0.1
- [highlight.js](https://npm.io/package/highlight.js.md) ^9.0.0

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2018-06-01
- 1.0.1 — 2015-07-30
- 1.0.0 — 2015-02-09

## README

# jstransformer-highlight

[Highlight.js](http://highlightjs.org) support for [JSTransformers](http://github.com/jstransformers).

[![Build Status](https://img.shields.io/travis/jstransformers/jstransformer-highlight/master.svg)](https://travis-ci.org/jstransformers/jstransformer-highlight)
[![Coverage Status](https://img.shields.io/codecov/c/github/jstransformers/jstransformer-highlight/master.svg)](https://codecov.io/gh/jstransformers/jstransformer-highlight)
[![Dependency Status](https://img.shields.io/david/jstransformers/jstransformer-highlight/master.svg)](http://david-dm.org/jstransformers/jstransformer-highlight)
[![Greenkeeper badge](https://badges.greenkeeper.io/jstransformers/jstransformer-highlight.svg)](https://greenkeeper.io/)
[![NPM version](https://img.shields.io/npm/v/jstransformer-highlight.svg)](https://www.npmjs.org/package/jstransformer-highlight)

### Options

 - `lang` - The language the code is in
 - `auto` - defaults to `true` if `lang` is undefined.  Set this to `true` to have highlight.js auto-detect the language.  Set this to `false` to disable auto-detection even when there is no `lang` option.

### Example

```js
var highlight = require('jstransformer')(require('jstransformer-highlight'))

highlight.render('var i = 5 + 10;', { lang: 'javascript' }).body
//=> '<span class=\"hljs-variable\"><span class=\"hljs-keyword\">var</span> i</span> = <span class=\"hljs-number\">5</span> + <span class=\"hljs-number\">10</span>;'
```

## License

MIT

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