mongo-query-converter

1.0.0 • Public • Published

mongo-query-converter

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 } }
 

Readme

Keywords

Package Sidebar

Install

npm i mongo-query-converter

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

3.31 kB

Total Files

5

Last publish

Collaborators

  • yunusbatus
  • bsonmez