theprogrammablemind
Advanced tools
Comparing version 8.3.0-beta.1 to 8.3.0-beta.2
@@ -68,4 +68,4 @@ { | ||
}, | ||
"version": "8.3.0-beta.1", | ||
"version": "8.3.0-beta.2", | ||
"license": "UNLICENSED" | ||
} |
@@ -43,13 +43,28 @@ const { InitCalls } = require('./helpers') | ||
const isA = (hierarchy) => (child, parent) => { | ||
const isA = (hierarchy) => (child, parent, { extended=false } = {}) => { | ||
if (!child || !parent) { | ||
return false | ||
} | ||
if (child.marker) { | ||
child = child.marker | ||
if (extended) { | ||
if (hierarchy.isA(child.marker || child, parent.marker || parent)) { | ||
return true | ||
} | ||
for (const childT of child.types || [child]) { | ||
for (const parentT of parent.types || [parent]) { | ||
if (hierarchy.isA(childT, parentT)) { | ||
return true | ||
} | ||
} | ||
} | ||
return false | ||
} else { | ||
if (child.marker) { | ||
child = child.marker | ||
} | ||
if (parent.marker) { | ||
parent = parent.marker | ||
} | ||
return hierarchy.isA(child, parent) | ||
} | ||
if (parent.marker) { | ||
parent = parent.marker | ||
} | ||
return hierarchy.isA(child, parent) | ||
} | ||
@@ -56,0 +71,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
248407
6982