Skip to content

bccsa/MongoResolve

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mongoresolve

MongoDB Query parser and custom resolver

Project Structure

This is a monorepo containing:

  • packages/mongoresolve - The main library package that exports the MongoResolve class
  • packages/test-project - Integration tests and examples of using the library

Getting Started

Installation

npm install

Building

Build all packages:

npm run build

Testing

Run all tests:

npm test

Code Formatting

This project uses Prettier with a tab width of 4 spaces.

Check formatting:

npm run format:check

Format code:

npm run format

Library Usage

The mongoresolve library works in both Node.js and browser environments.

Node.js (CommonJS)

const { MongoResolve } = require('mongoresolve');

const resolver = new MongoResolve({ name: 'John' });
console.log(resolver.getQuery());

Node.js (ESM) / Browser

import { MongoResolve } from 'mongoresolve';

const resolver = new MongoResolve({ name: 'John' });
console.log(resolver.getQuery());

For more details, see the library README.

Development

The library is built with TypeScript and generates both CommonJS and ESM outputs to support various environments:

  • CommonJS (dist/cjs) - For Node.js require()
  • ESM (dist/esm) - For modern import statements
  • Type definitions (dist/types) - TypeScript declarations

License

MIT

About

MongoDB Query parser and custom resolver

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •