You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

jsonpatch-to-mongodb

Package Overview
Dependencies
Maintainers
46
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsonpatch-to-mongodb

Convert JSON patches into a MongoDB update

1.0.0
latest
Source
npmnpm
Version published
Weekly downloads
2.2K
-23.09%
Maintainers
46
Weekly downloads
 
Created
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

mongodb.js

FAQs

Package last updated on 14 Jan 2020

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