New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mongo-dot-notation

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongo-dot-notation - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

1

index.js

@@ -52,2 +52,3 @@ 'use strict'

value === null ||
value === undefined ||
value.constructor.name === 'ObjectID'

@@ -54,0 +55,0 @@ }

8

package.json
{
"name": "mongo-dot-notation",
"version": "1.0.4",
"version": "1.0.5",
"description": "Convert simple objects to mongo update operators",

@@ -31,6 +31,6 @@ "author": {

"devDependencies": {
"chai": "^3.4.1",
"mocha": "^2.3.4",
"mongodb": "^2.0.49"
"chai": "^3.5.0",
"mocha": "^2.4.5",
"mongodb": "^2.1.7"
}
}

@@ -13,3 +13,3 @@ 'use strict'

expect(dot.flatten(obj)).to.deep.equal({})
})
});

@@ -68,3 +68,18 @@ it('when is number returns the number', function () {

describe('graceful primitive handling', function() {
it('Handles null gracefully', function () {
var obj = { x: null }
expect(dot.flatten(obj)).to.deep.equal({ $set: { x: null } })
});
it('Handles undefined gracefully', function () {
var obj = { x: undefined }
expect(dot.flatten(obj)).to.deep.equal({ $set: { x: undefined } })
});
})
describe('#one-level scenarios with operators', function () {
it('when a property is $inc', function () {

@@ -71,0 +86,0 @@ var obj = { x: 1, y: op.$inc(2) }

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc