🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

mongodb-schema

Package Overview
Dependencies
Maintainers
1
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongodb-schema - npm Package Compare versions

Comparing version

to
0.6.0

12

lib/mongodb-schema.js

@@ -15,3 +15,3 @@ /**

function schema(documents, options) {
var SCHEMA_VERSION = "0.5.2";
var SCHEMA_VERSION = "0.6.0";

@@ -215,8 +215,4 @@ /**

var type_keys = Object.keys(schema[$t]);
if (type_keys.length == 1) {
if (type_keys[0] == 'object') {
delete schema[$t];
} else {
schema[$t] = type_keys[0];
}
if (type_keys.length === 1) {
schema[$t] = type_keys[0];
}

@@ -454,2 +450,4 @@ }

schema = _cleanup(schema);
// always delete outermost #type
delete schema[$t];
}

@@ -456,0 +454,0 @@

{
"name": "mongodb-schema",
"description": "Infer a probabilistic schema javascript objects, JSON documents or a MongoDB collection",
"version": "0.5.2",
"description": "Infer probabilistic schema of javascript objects or a MongoDB collection.",
"version": "0.6.0",
"author": "Thomas Rueckstiess <thomas@rueckstiess.net>",

@@ -6,0 +6,0 @@ "license": "Apache",

@@ -50,2 +50,3 @@ var schema = require('../').schema,

"#count": 2,
"#type": "object",
"b": {

@@ -52,0 +53,0 @@ "#count": 2,