https://github.com/mikro-orm/mongo-highlighter
Mongo query highlighting for CLI
https://github.com/mikro-orm/mongo-highlighter
mongodb nodejs
Last synced: about 1 month ago
JSON representation
Mongo query highlighting for CLI
- Host: GitHub
- URL: https://github.com/mikro-orm/mongo-highlighter
- Owner: mikro-orm
- License: mit
- Created: 2020-08-08T06:39:56.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2025-05-05T18:14:05.000Z (about 1 month ago)
- Last Synced: 2025-05-05T19:32:54.526Z (about 1 month ago)
- Topics: mongodb, nodejs
- Language: TypeScript
- Size: 348 KB
- Stars: 2
- Watchers: 2
- Forks: 3
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
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: '[email protected]', 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.