Skip to content

glocalzone/mongo-query-converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MongoDB Query Converter

Stars Issues contributions welcome GitHub release GitHub license

It's a MongoDB helper tool that converters the given string date variable into JavaScript date format

Install

yarn add mongo-query-converter

Usage

const { convertQuery } = require("mongo-query-converter");

let query = { createdAt : { $gte:"2020-03-18 14:08:31.601+03:00" } }

query = convertQuery(query, { dateKeys: ["createdAt"] } ; 
// query { createdAt: { $gte : 2020-04-03T17:37:56.782Z } }

About

It's a MongoDB helper tool that converters the given string date variable into JavaScript date format

Resources

License

Stars

Watchers

Forks

Packages

No packages published