# nanolight

> ‘nanolight’ is code highlighter for any programming language. Works in both Node.js and the browser. Lightweight. No dependencies.

Latest version **1.6.21** (published 2018-06-21) · ISC license · 0 weekly downloads

## Install

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

## 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.6.21 |
| Published | 2018-06-21 |
| First published | 2018-05-25 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 10.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Jackens |
| Maintainers | jackens |
| Keywords | highlight, highlighter |

## Links

- npm: https://www.npmjs.com/package/nanolight
- Repository: https://github.com/jackens/nanolight
- Homepage: https://github.com/jackens/nanolight#readme
- Issues: https://github.com/jackens/nanolight/issues
- npm.io page: https://npm.io/package/nanolight

## 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

- 1.6.21 (latest) — 2018-06-21
- 1.6.15 — 2018-06-15
- 1.6.14 — 2018-06-14
- 1.6.13 — 2018-06-11
- 1.6.12 — 2018-06-10
- 1.6.11 — 2018-06-09
- 1.6.10 — 2018-06-08
- 1.6.9 — 2018-06-07
- 1.6.8 — 2018-06-06
- 1.6.7 — 2018-06-06
- 1.6.6 — 2018-06-06
- 1.6.4 — 2018-06-04
- 1.5.31 — 2018-05-30
- 1.5.30 — 2018-05-30
- 1.5.29 — 2018-05-29
- … 2 more at https://npm.io/package/nanolight/versions

## README

# nanolight

‘nanolight’ is code highlighter for any programming language.
Works in both Node.js and the browser.
Lightweight. No dependencies.

## Install

### NPM

```bash
npm install nanolight
```

### CDN

```html
<script type="text/javascript" src="https://cdn.rawgit.com/jackens/nanolight/master/nanolight.js"></script>
```

or

```html
<script type="text/javascript" src="https://cdn.rawgit.com/jackens/nanolight/master/nanolight.min.js"></script>
```

or

```html
<script type="text/javascript" src="https://unpkg.com/nanolight/nanolight.js"></script>
```

or

```html
<script type="text/javascript" src="https://unpkg.com/nanolight/nanolight.min.js"></script>
```

## Usage

```js
var nanolight = require('nanolight')

nanolight('var theAnswerToLifeTheUniverseAndEverything = 42')

var elements = document.getElementsByClassName('nl')
for (var i = 0; i < elements.length; i++) {
  elements[i].innerHTML = nanolight(elements[i].innerText)
}
```

More usage examples can be found at <https://jackens.github.io/>.

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