# @mikro-orm/mongo-highlighter

> Node.js MongoDB query highlighter for CLI based.

Latest version **1.0.0** (published 2020-08-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install @mikro-orm/mongo-highlighter
pnpm add @mikro-orm/mongo-highlighter
yarn add @mikro-orm/mongo-highlighter
bun add @mikro-orm/mongo-highlighter
```

## Health

**Score 40/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2020-08-08 |
| First published | 2020-08-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >= 10.13.0 |
| Dependencies | 1 |
| Unpacked size | 14.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Martin Adámek |
| Maintainers | b4nan |
| Keywords | mongodb, mongo, nodejs, highlight, tokenizer |

## Links

- npm: https://www.npmjs.com/package/@mikro-orm/mongo-highlighter
- Repository: https://github.com/mikro-orm/mongo-highlighter
- Homepage: https://mikro-orm.io
- Issues: https://github.com/mikro-orm/mongo-highlighter/issues
- npm.io page: https://npm.io/package/@mikro-orm/mongo-highlighter

## Dependencies (1)

- [ansi-colors](https://npm.io/package/ansi-colors.md) ^4.1.1

## Alternatives

- [angular-pipes](https://npm.io/package/angular-pipes.md) — 5.6K weekly downloads
- [@ng-web-apis/midi](https://npm.io/package/@ng-web-apis/midi.md) — 2.6K weekly downloads
- [happn-3](https://npm.io/package/happn-3.md) — 1.6K weekly downloads
- [@opensip-cli/lang-go](https://npm.io/package/@opensip-cli/lang-go.md) — 1.2K weekly downloads
- [mongoose-typescript](https://npm.io/package/mongoose-typescript.md) — 85 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2020-08-08

## README

# MongoDB query highlighter for CLI

- built for CLI
- (almost) dependency free

## 🚀 Quick Start

```
$ yarn add @mikro-orm/mongo-highlighter
```

or

```
$ npm i -s @mikro-orm/mongo-highlighter 
```

Usage:

```typescript
import { MongoHighlighter } from '@mikro-orm/mongo-highlighter';

const highlighter = new MongoHighlighter();
const ret = highlighter.highlight(`db.getCollection('author').insertOne({ createdAt: ISODate('2020-01-01T12:00:00Z'), updatedAt: ISODate('2020-01-01T12:00:00Z'), foo: 'bar', name: 'Jon Snow', email: 'snow@wall.st', termsAccepted: false }, { session: '[ClientSession]' });`);
console.log(ret);
```

## 🤝 Contributing

Contributions, issues and feature requests are welcome. 

## Authors

👤 **Martin Adámek**

- Twitter: [@B4nan](https://twitter.com/B4nan)
- Github: [@b4nan](https://github.com/b4nan)

See also the list of contributors who [participated](https://github.com/mikro-orm/mikro-orm/contributors) in this project.

## Show Your Support

Please ⭐️ this repository if this project helped you!

## 📝 License

Copyright © 2020 [Martin Adámek](https://github.com/b4nan).

This project is licensed under the MIT License - see the [LICENSE file](LICENSE) for details.

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