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.0.4 to 1.0.5

9

dist/index.js

@@ -56,2 +56,3 @@ "use strict";

var config;
var rootDocument;
function default_1(input, options) {

@@ -73,2 +74,3 @@ if (input.nodeType !== Node.ELEMENT_NODE) {

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

@@ -91,2 +93,5 @@ return bottomUpSearch(input, Limit.Two, function () {

exports.default = default_1;
function findRootDocument(rootNode) {
return (rootNode.nodeType === Node.DOCUMENT_NODE) ? rootNode : rootNode.ownerDocument;
}
function bottomUpSearch(input, limit, fallback) {

@@ -173,3 +178,3 @@ var path = null;

function unique(path) {
switch (document.querySelectorAll(selector(path)).length) {
switch (rootDocument.querySelectorAll(selector(path)).length) {
case 0:

@@ -320,4 +325,4 @@ throw new Error("Can't select any node with this selector: " + selector(path));

function same(path, input) {
return document.querySelector(selector(path)) === input;
return rootDocument.querySelector(selector(path)) === input;
}
//# sourceMappingURL=index.js.map
{
"name": "@medv/finder",
"version": "1.0.4",
"version": "1.0.5",
"description": "CSS Selector Generator",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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