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.1 to 1.1.2

1

dist/index.d.ts

@@ -6,2 +6,3 @@ export declare type Options = {

tagName: (name: string) => boolean;
attr: (name: string, value: string) => boolean;
seedMinLength: number;

@@ -8,0 +9,0 @@ optimizedMinLength: number;

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

if ('html' === input.tagName.toLowerCase()) {
return input.tagName.toLowerCase();
return 'html';
}

@@ -73,2 +73,3 @@ var defaults = {

tagName: function (name) { return true; },
attr: function (name, value) { return false; },
seedMinLength: 1,

@@ -112,3 +113,3 @@ optimizedMinLength: 2,

var _loop_1 = function () {
var level = maybe(id(current)) || maybe.apply(void 0, classNames(current)) || maybe(tagName(current)) || [any()];
var level = maybe(id(current)) || maybe.apply(void 0, attr(current)) || maybe.apply(void 0, classNames(current)) || maybe(tagName(current)) || [any()];
var nth = index(current);

@@ -207,2 +208,9 @@ if (limit === Limit.All) {

}
function attr(input) {
var attrs = Array.from(input.attributes).filter(function (attr) { return config.attr(attr.name, attr.value); });
return attrs.map(function (attr) { return ({
name: '[' + cssesc(attr.name, { isIdentifier: true }) + '="' + cssesc(attr.value) + '"]',
penalty: 0.5
}); });
}
function classNames(input) {

@@ -209,0 +217,0 @@ var names = Array.from(input.classList)

4

package.json
{
"name": "@medv/finder",
"version": "1.1.1",
"version": "1.1.2",
"description": "CSS Selector Generator",

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

"release-it": "^7.6.1",
"typescript": "^3.0.1"
"typescript": "3.0.1"
},

@@ -38,0 +38,0 @@ "ava": {

@@ -22,2 +22,6 @@ ![finder](https://user-images.githubusercontent.com/141232/36463709-381f8c36-16fe-11e8-8fdc-fcbdd4f2a36c.png)

<a href="https://www.patreon.com/antonmedv">
<img src="https://c5.patreon.com/external/logo/become_a_patron_button@2x.png" width="160">
</a>
## Usage

@@ -24,0 +28,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