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

typanion

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typanion - npm Package Compare versions

Comparing version 3.2.1 to 3.3.0

4

lib/index.d.ts

@@ -135,3 +135,5 @@ type BoundCoercionFn = () => BoundCoercionFn;

}
declare const hasKeyRelationship: (subject: string, relationship: KeyRelationship, others: string[]) => LooseValidator<{
declare const hasKeyRelationship: (subject: string, relationship: KeyRelationship, others: string[], { ignore, }?: {
ignore?: any[] | undefined;
}) => LooseValidator<{
[key: string]: unknown;

@@ -138,0 +140,0 @@ }, {

@@ -374,6 +374,7 @@ 'use strict';

if (typeof (state === null || state === void 0 ? void 0 : state.coercions) !== `undefined`) {
if (typeof (state === null || state === void 0 ? void 0 : state.coercion) === `undefined`)
return pushError(state, `Unbound coercion result`);
if (context.value !== value)
if (context.value !== value) {
if (typeof (state === null || state === void 0 ? void 0 : state.coercion) === `undefined`)
return pushError(state, `Unbound coercion result`);
state.coercions.push([(_a = state.p) !== null && _a !== void 0 ? _a : `.`, state.coercion.bind(null, context.value)]);
}
(_b = state === null || state === void 0 ? void 0 : state.coercions) === null || _b === void 0 ? void 0 : _b.push(...subCoercions);

@@ -623,3 +624,4 @@ }

};
const hasKeyRelationship = (subject, relationship, others) => {
const hasKeyRelationship = (subject, relationship, others, { ignore = [], } = {}) => {
const skipped = new Set(ignore);
const otherSet = new Set(others);

@@ -630,7 +632,7 @@ const spec = keyRelationships[relationship];

const keys = new Set(Object.keys(value));
if (!keys.has(subject))
if (!keys.has(subject) || skipped.has(value[subject]))
return true;
const problems = [];
for (const key of otherSet)
if (keys.has(key) !== spec.expect)
if ((keys.has(key) && !skipped.has(value[key])) !== spec.expect)
problems.push(key);

@@ -637,0 +639,0 @@ if (problems.length >= 1)

{
"name": "typanion",
"version": "3.2.1",
"version": "3.3.0",
"main": "lib/index",

@@ -5,0 +5,0 @@ "license": "MIT",

Sorry, the diff of this file is not supported yet

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