Socket
Socket
Sign inDemoInstall

@ark/schema

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ark/schema - npm Package Compare versions

Comparing version 0.18.0 to 0.19.0

12

out/roots/morph.js

@@ -70,7 +70,9 @@ import { arrayEquals, liftArray, throwParseError } from "@ark/util";

...defineRightwardIntersections("morph", (l, r, ctx) => {
const inTersection = intersectOrPipeNodes(l.in, r, ctx);
return inTersection instanceof Disjoint ? inTersection : (inTersection.distribute(branch => ({
...l.inner,
in: branch
}), ctx.$.parseSchema));
const inTersection = l.inner.in ? intersectOrPipeNodes(l.inner.in, r, ctx) : r;
return (inTersection instanceof Disjoint ? inTersection
: inTersection.equals(l.inner.in) ? l
: ctx.$.node("morph", {
...l.inner,
in: inTersection
}));
})

@@ -77,0 +79,0 @@ }

@@ -36,15 +36,7 @@ import { Disjoint } from "./disjoint.js";

return l;
let result;
if (isPureIntersection) {
if (l.equals(r))
return l;
result = _intersectNodes(l, r, ctx);
}
else {
result =
l.hasKindIn(...rootKinds) ?
// if l is a RootNode, r will be as well
_pipeNodes(l, r, ctx)
: _intersectNodes(l, r, ctx);
}
let result = isPureIntersection ? _intersectNodes(l, r, ctx)
: l.hasKindIn(...rootKinds) ?
// if l is a RootNode, r will be as well
_pipeNodes(l, r, ctx)
: _intersectNodes(l, r, ctx);
if (isNode(result)) {

@@ -51,0 +43,0 @@ // if the result equals one of the operands, preserve its metadata by

{
"name": "@ark/schema",
"version": "0.18.0",
"version": "0.19.0",
"license": "MIT",

@@ -5,0 +5,0 @@ "author": {

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