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

@ng-doc/core

Package Overview
Dependencies
Maintainers
1
Versions
195
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ng-doc/core - npm Package Compare versions

Comparing version 17.6.4 to 17.6.5

20

classes/html-parser.js

@@ -22,8 +22,11 @@ "use strict";

const node = !(0, helpers_1.isPresent)(shiftNode) || !(0, helpers_1.isNodeTag)(shiftNode) ? undefined : shiftNode;
if (tagSelectors.every((tagSelector) => tagSelector.name.toLowerCase() === String(node?.tag).toLowerCase()) &&
attrSelectors.every((attrSelector) => {
const attrValue = node && node.attrs && node?.attrs[attrSelector.name];
return (Object.keys(node?.attrs ?? {}).includes(attrSelector.name) &&
attrValue === attrSelector.value);
})) {
const tagSelectorMatch = tagSelectors.every((tagSelector) => tagSelector.name.toLowerCase() === String(node?.tag).toLowerCase()) || !tagSelectors.length;
const attrSelectorsMatch = attrSelectors.every((attrSelector) => {
const nodeAttrs = node?.attrs ?? {};
const hasAttr = Object.keys(nodeAttrs).includes(attrSelector.name) ||
Object.keys(nodeAttrs).includes(`[${attrSelector.name}]`);
const attrValue = nodeAttrs[attrSelector.name] ?? nodeAttrs[`[${attrSelector.name}]`];
return (hasAttr && !attrSelector.value) || attrValue === attrSelector.value;
}) || !attrSelectors.length;
if (tagSelectorMatch && attrSelectorsMatch) {
return node;

@@ -54,4 +57,7 @@ }

setAttributesFromSelectors(element, selectors) {
const elementAttrs = element.attrs ?? {};
selectors.forEach((selector) => {
if (selector.type === 'attribute') {
if (selector.type === 'attribute' &&
!elementAttrs[selector.name] &&
!elementAttrs[`[${selector.name}]`]) {
this.setAttribute(element, selector.name, selector.value);

@@ -58,0 +64,0 @@ }

{
"name": "@ng-doc/core",
"version": "17.6.4",
"version": "17.6.5",
"type": "commonjs",

@@ -5,0 +5,0 @@ "sideEffects": false,

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