Socket
Socket
Sign inDemoInstall

metaschema

Package Overview
Dependencies
Maintainers
6
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

metaschema - npm Package Compare versions

Comparing version 2.1.0 to 2.1.1

CHANGELOG.md

2

lib/metadata.js

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

static isInstance(err) {
return err && err.errors && Array.isArray(err.errors);
return Array.isArray(err?.errors);
}

@@ -45,0 +45,0 @@ }

@@ -31,3 +31,4 @@ 'use strict';

const schemaError = new SchemaError(path);
if (!this.required && value === undefined) return schemaError;
const isEmpty = value === null || value === undefined;
if (!this.required && isEmpty) return schemaError;
try {

@@ -48,3 +49,3 @@ schemaError.add(this.checkType(value, path));

const { root, ...rest } = this;
return rest;
return root, rest;
}

@@ -51,0 +52,0 @@ }

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

isInstance(value) {
return value && value.constructor && value.constructor.name === 'Map';
return value?.constructor?.name === 'Map';
},

@@ -95,3 +95,3 @@

isInstance(value) {
return value && value.constructor && value.constructor.name === 'Set';
return value?.constructor?.name === 'Set';
},

@@ -98,0 +98,0 @@ };

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

const { root, ...rest } = this.fields;
return rest;
return root, rest;
}

@@ -113,0 +113,0 @@ }

@@ -42,4 +42,3 @@ 'use strict';

const isInstanceOf = (obj, constrName) =>
obj && obj.constructor && obj.constructor.name === constrName;
const isInstanceOf = (obj, constrName) => obj?.constructor?.name === constrName;

@@ -46,0 +45,0 @@ module.exports = {

{
"name": "metaschema",
"version": "2.1.0",
"version": "2.1.1",
"author": "Timur Shemsedinov <timur.shemsedinov@gmail.com>",

@@ -46,12 +46,12 @@ "description": "Metadata Schema and Interface Definition Language (IDL)",

"dependencies": {
"metautil": "^3.5.20",
"metavm": "^1.2.0"
"metautil": "^3.5.23",
"metavm": "^1.2.1"
},
"devDependencies": {
"@types/node": "^18.0.0",
"eslint": "^8.18.0",
"@types/node": "^18.7.6",
"eslint": "^8.22.0",
"eslint-config-metarhia": "^8.1.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-prettier": "^4.2.1",
"metatests": "^0.8.2",

@@ -58,0 +58,0 @@ "prettier": "^2.7.1",

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