# node-prismjs

> An adapter which make it easier to use Prism in Node.js.

Latest version **0.1.2** (published 2018-06-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install node-prismjs
pnpm add node-prismjs
yarn add node-prismjs
bun add node-prismjs
```

## 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.2 |
| Published | 2018-06-29 |
| First published | 2016-05-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.4 KB |
| Known vulnerabilities | 0 (+5 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 24 |
| Author | Benjy Cui |
| Maintainers | benjycui |
| Keywords | prism.js, node.js, adapter |

## Links

- npm: https://www.npmjs.com/package/node-prismjs
- Repository: https://github.com/benjycui/node-prismjs
- Homepage: https://github.com/benjycui/node-prismjs#readme
- Issues: https://github.com/benjycui/node-prismjs/issues
- npm.io page: https://npm.io/package/node-prismjs

## Dependencies (1)

- [prismjs](https://npm.io/package/prismjs.md) ~1.6.0

## Alternatives

- [@oh-my-pi/pi-natives](https://npm.io/package/@oh-my-pi/pi-natives.md) — 51.8K weekly downloads
- [@capgo/capacitor-light-sensor](https://npm.io/package/@capgo/capacitor-light-sensor.md) — 3.0K weekly downloads
- [@heyhuynhgiabuu/pi-diff](https://npm.io/package/@heyhuynhgiabuu/pi-diff.md) — 492 weekly downloads
- [@lotsa/verdant-lang-asm](https://npm.io/package/@lotsa/verdant-lang-asm.md) — 38 weekly downloads
- [new-era-syntax](https://npm.io/package/new-era-syntax.md) — 20 weekly downloads

## Recent versions

- 0.1.2 (latest) — 2018-06-29
- 0.1.1 — 2017-09-11
- 0.1.0 — 2016-05-17
- 0.1.0-beta.0 — 2016-05-17

## README

# node-prismjs

[![npm package](https://img.shields.io/npm/v/node-prismjs.svg?style=flat-square)](https://www.npmjs.org/package/node-prismjs)
[![NPM downloads](http://img.shields.io/npm/dm/node-prismjs.svg?style=flat-square)](https://npmjs.org/package/node-prismjs)
[![Dependency Status](https://david-dm.org/benjycui/node-prismjs.svg?style=flat-square)](https://david-dm.org/benjycui/node-prismjs)

An adapter which make it easier to use [Prism](http://prismjs.com/) in Node.js.

## Usage

Installation:

```bash
npm install --save node-prismjs
```

In Node.js

```js
const Prism = require('node-prismjs');
function highlight(lang, sourceCode) {
  const language = Prism.languages[lang] || Prism.languages.autoit;
  return Prism.highlight(sourceCode, language);
}
```

## License

MIT

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