Socket
Socket
Sign inDemoInstall

jsonpatch-to-mongodb

Package Overview
Dependencies
0
Maintainers
46
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    jsonpatch-to-mongodb

Convert JSON patches into a MongoDB update


Version published
Weekly downloads
13K
increased by0.95%
Maintainers
46
Install size
5.68 kB
Created
Weekly downloads
 

Readme

Source

jsonpatch-to-mongodb

build status

Convert JSON patches into a MongoDB update.

Example

var toMongodb = require('jsonpatch-to-mongodb');
var patches = [{
  op: 'replace',
  path: '/name',
  value: 'dave'
}];

console.log(toMongodb(patches));
// {'$set': {name: 'dave'}};

Example: with express and mongoose

Install

npm install --save jsonpatch-to-mongodb

Test

npm test

License

MIT

Keywords

FAQs

Last updated on 14 Jan 2020

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc