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

basisjs-tools-ast

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

basisjs-tools-ast - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

37

lib/html/index.js

@@ -173,11 +173,14 @@ var htmlparser = require('htmlparser2');

getElementByName: function(node, name){
var nodes = Array.isArray(node) ? node.slice() : [node];
if (node)
{
var nodes = Array.isArray(node) ? node.slice() : [node];
while (nodes.length)
{
var node = nodes.shift();
if (node.name == name)
return node;
if (node.children)
nodes.unshift.apply(nodes, node.children);
while (nodes.length)
{
var node = nodes.shift();
if (node.name == name)
return node;
if (node.children)
nodes.unshift.apply(nodes, node.children);
}
}

@@ -188,12 +191,16 @@

getElementsByName: function(node, name){
var nodes = Array.isArray(node) ? node.slice() : [node];
var result = [];
while (nodes.length)
if (node)
{
var node = nodes.shift();
if (node.name == name)
result.push(node);
if (node.children)
nodes.unshift.apply(nodes, node.children);
var nodes = Array.isArray(node) ? node.slice() : [node];
while (nodes.length)
{
var node = nodes.shift();
if (node.name == name)
result.push(node);
if (node.children)
nodes.unshift.apply(nodes, node.children);
}
}

@@ -200,0 +207,0 @@

{
"name": "basisjs-tools-ast",
"version": "1.0.2",
"version": "1.0.3",
"description": "Tool set for basisjs-tools to work with various AST",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/basisjs/basisjs-tools-ast",

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