@mikro-orm/mongo-highlighter
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

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:

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

See also the list of contributors who participated in this project.

Show Your Support

Please ⭐️ this repository if this project helped you!

📝 License

Copyright © 2020 Martin Adámek.

This project is licensed under the MIT License - see the LICENSE file for details.

Package Sidebar

Install

npm i @mikro-orm/mongo-highlighter

Homepage

mikro-orm.io

Weekly Downloads

568

Version

1.0.0

License

MIT

Unpacked Size

14.6 kB

Total Files

11

Last publish

Collaborators

  • b4nan