You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

json2mongo

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

json2mongo

A MongoDB Extended JSON conversion utility which converts Strict Mode syntax to JavaScript Mode


Version published
Weekly downloads
1.3K
increased by11.29%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

json2mongo

This is a MongoDB Extended JSON convertion utility which converts Strict Mode syntax to JavaScript Mode.

Build status js-standard-style

Installation

npm install json2mongo --save

Example usage

var json2mongo = require('json2mongo');

var query = {
  created: { $date: '2013-01-01T00:00:00.000Z' },
  foo: { $undefined: true },
  bar: { $regex: '[0-9]' },
  baz: { $regex: '[a-z]', $options: 'i' }
};

json2mongo(query); // {
                   //   created: new Date('2013-01-01T00:00:00.000Z'),
                   //   foo: undefined,
                   //   bar: /[0-9]/,
                   //   baz: /[a-z]/i
                   // }

License

MIT

Keywords

FAQs

Package last updated on 20 Nov 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc