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

@medv/finder

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@medv/finder - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

16

dist/index.js

@@ -77,3 +77,3 @@ "use strict";

config = __assign({}, defaults, options);
rootDocument = findRootDocument(config.root);
rootDocument = findRootDocument(config.root, defaults);
var path = bottomUpSearch(input, Limit.All, function () {

@@ -96,4 +96,10 @@ return bottomUpSearch(input, Limit.Two, function () {

exports.default = default_1;
function findRootDocument(rootNode) {
return (rootNode.nodeType === Node.DOCUMENT_NODE) ? rootNode : rootNode.ownerDocument;
function findRootDocument(rootNode, defaults) {
if (rootNode.nodeType === Node.DOCUMENT_NODE) {
return rootNode;
}
if (rootNode === defaults.root) {
return rootNode.ownerDocument;
}
return rootNode;
}

@@ -234,7 +240,7 @@ function bottomUpSearch(input, limit, fallback) {

var i = 0;
while (true) {
while (child) {
if (child.nodeType === Node.ELEMENT_NODE) {
i++;
}
if (child === input || !child.nextSibling) {
if (child === input) {
break;

@@ -241,0 +247,0 @@ }

{
"name": "@medv/finder",
"version": "1.1.0",
"version": "1.1.1",
"description": "CSS Selector Generator",

@@ -13,3 +13,3 @@ "main": "dist/index.js",

"test": "tsc && ava",
"prepublish": "tsc",
"prepare": "tsc",
"release": "release-it --access public"

@@ -35,3 +35,3 @@ },

"browser-env": "^3.2.5",
"release-it": "^7.5.0",
"release-it": "^7.6.1",
"typescript": "^3.0.1"

@@ -38,0 +38,0 @@ },

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