Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

moltyjs

Package Overview
Dependencies
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

moltyjs - npm Package Compare versions

Comparing version 0.8.1 to 0.8.2

7

CHANGELOG.md

@@ -34,2 +34,8 @@ ## [Unreleased]

## [0.8.2] - 2018-01-22
### Fixed
* Bugs in validation Schema field names (Document payload)
## [0.8.1] - 2018-01-12

@@ -378,2 +384,3 @@

[0.8.2]: https://github.com/Yonirt/moltyjs/compare/v0.8.1...v0.8.2
[0.8.1]: https://github.com/Yonirt/moltyjs/compare/v0.8.0...v0.8.1

@@ -380,0 +387,0 @@ [0.8.0]: https://github.com/Yonirt/moltyjs/compare/v0.7.0...v0.8.0

4

lib/model.js

@@ -204,3 +204,3 @@ 'use strict';

// Array
if (!schema[key].type && isArray(schema[key])) {
if (isArray(schema[key]) && !schema[key][0].type && payload[key]) {
payload[key].forEach(arrayItem => {

@@ -212,3 +212,3 @@ return this._validatePayloadFieldNames(arrayItem, schema[key][0]);

// Objects nested
if (!schema[key].type && isObject(schema[key]) && !isArray(schema[key])) {
if (isObject(schema[key]) && !isArray(schema[key]) && !schema[key].type && isObject(payload[key]) && Object.keys(payload[key]).length > 0) {
return this._validatePayloadFieldNames(payload[key], schema[key]);

@@ -215,0 +215,0 @@ }

{
"name": "moltyjs",
"version": "0.8.1",
"version": "0.8.2",
"description": "A tiny ODM for MongoDB with multy tenancy support.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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