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.0 to 1.0.1

3

index.js

@@ -50,3 +50,4 @@ 'use strict'

util.isArray(value) ||
util.isDate(value)
util.isDate(value) ||
value.constructor.name === 'ObjectID'
}

@@ -53,0 +54,0 @@

{
"name": "mongo-dot-notation",
"version": "1.0.0",
"version": "1.0.1",
"description": "Convert simple objects to mongo update operators",

@@ -19,3 +19,3 @@ "author": {

"operators",
"json",
"json",
"objects",

@@ -33,4 +33,5 @@ "parsing",

"chai": "^3.2.0",
"mocha": "^2.2.5"
"mocha": "^2.2.5",
"mongodb": "^2.0.42"
}
}

@@ -7,2 +7,4 @@ 'use strict'

var ObjectID = require('mongodb').ObjectID
describe('#primitive types scenarios', function () {

@@ -34,2 +36,7 @@ it('when is an empty object returns empty', function () {

it('when is ObjectID returns the object', function () {
var id = new ObjectID()
expect(dot.flatten(id)).to.equal(id)
})
it('when is Array returns the Array', function () {

@@ -257,3 +264,5 @@ var arr = [1, 2, 3]

it('when has many inner properties with operators', function () {
var obj = {
var id = new ObjectID()
var obj = {
id: id,
a: {

@@ -278,2 +287,3 @@ b: {

$set: {
'id': id,
'a.b.d': 2,

@@ -280,0 +290,0 @@ 'n': { a: { b: { c: 'd' } } }

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