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

optimal

Package Overview
Dependencies
Maintainers
1
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

optimal - npm Package Compare versions

Comparing version 2.1.0 to 2.1.1

esm/instanceOf.js

6

CHANGELOG.md

@@ -0,1 +1,7 @@

# 2.1.1 - 2018-02-07
#### 🐞 Fixed
- Fixed some inheritance issues for instance of checks in loose mode.
# 2.1.0 - 2018-02-06

@@ -2,0 +8,0 @@

3

esm/InstanceBuilder.js

@@ -10,2 +10,3 @@ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";

import isObject from './isObject';
import instanceOf from './instanceOf';

@@ -50,3 +51,3 @@ var InstanceBuilder = function (_Builder) {

if (refClass) {
this.invariant(typeof refClass === 'function' && (value instanceof refClass || this.loose && isObject(value) && value.constructor.name === refClass.name), "Must be an instance of \"".concat(this.typeAlias(), "\"."), path);
this.invariant(typeof refClass === 'function' && (value instanceof refClass || this.loose && isObject(value) && instanceOf(value, refClass)), "Must be an instance of \"".concat(this.typeAlias(), "\"."), path);
} else {

@@ -53,0 +54,0 @@ this.invariant(isObject(value) && value.constructor !== Object, 'Must be a class instance.', path);

@@ -31,2 +31,4 @@ "use strict";

var _instanceOf = _interopRequireDefault(require("./instanceOf"));
var InstanceBuilder = function (_Builder) {

@@ -66,3 +68,3 @@ (0, _inherits2.default)(InstanceBuilder, _Builder);

if (refClass) {
this.invariant(typeof refClass === 'function' && (value instanceof refClass || this.loose && (0, _isObject.default)(value) && value.constructor.name === refClass.name), "Must be an instance of \"".concat(this.typeAlias(), "\"."), path);
this.invariant(typeof refClass === 'function' && (value instanceof refClass || this.loose && (0, _isObject.default)(value) && (0, _instanceOf.default)(value, refClass)), "Must be an instance of \"".concat(this.typeAlias(), "\"."), path);
} else {

@@ -69,0 +71,0 @@ this.invariant((0, _isObject.default)(value) && value.constructor !== Object, 'Must be a class instance.', path);

{
"name": "optimal",
"version": "2.1.0",
"version": "2.1.1",
"description": "A system for building and validating defined object structures.",

@@ -49,3 +49,3 @@ "main": "./lib/index.js",

"devDependencies": {
"@milesj/build-tools": "^0.24.0"
"@milesj/build-tools": "^0.24.1"
},

@@ -52,0 +52,0 @@ "beemo": {

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