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

@mariusandra/simmerjs

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mariusandra/simmerjs - npm Package Compare versions

Comparing version 0.5.6-posthog-2 to 0.6.0-posthog.1

lib/methods/inspectDataAttr.js

5

lib/methods/index.js

@@ -7,2 +7,6 @@ 'use strict';

var _inspectDataAttr = require('./inspectDataAttr');
var _inspectDataAttr2 = _interopRequireDefault(_inspectDataAttr);
var _inspectElementID = require('./inspectElementID');

@@ -45,2 +49,3 @@

parsingMethods.addMethod(_inspectDataAttr2.default);
parsingMethods.addMethod(_inspectElementID2.default);

@@ -47,0 +52,0 @@ parsingMethods.addMethod(_inspectTags2.default);

@@ -7,2 +7,3 @@ 'use strict';

exports.isUniqueElementID = isUniqueElementID;
exports.isUniqueDataAttr = isUniqueDataAttr;
exports.wrap = wrap;

@@ -30,2 +31,8 @@

function isUniqueDataAttr(query, dataAttr) {
// use selector to query an element and see if it is a one-to-one selection
var results = query('[data-attr="' + dataAttr + '"]') || [];
return results.length === 1;
}
function traverseAttribute(el, dir) {

@@ -32,0 +39,0 @@ var matched = [];

2

modules/methods/index.js

@@ -0,1 +1,2 @@

import inspectDataAttr from './inspectDataAttr'
import inspectElementID from './inspectElementID'

@@ -22,2 +23,3 @@ import inspectTags from './inspectTags'

parsingMethods.addMethod(inspectDataAttr)
parsingMethods.addMethod(inspectElementID)

@@ -24,0 +26,0 @@ parsingMethods.addMethod(inspectTags)

@@ -12,2 +12,8 @@ /**

export function isUniqueDataAttr (query, dataAttr) {
// use selector to query an element and see if it is a one-to-one selection
var results = query(`[data-attr="${dataAttr}"]`) || []
return results.length === 1
}
function traverseAttribute (el, dir) {

@@ -14,0 +20,0 @@ const matched = []

2

package.json
{
"name": "@mariusandra/simmerjs",
"description": "A pure Javascript reverse CSS selector engine which calculates a DOM element's unique CSS selector on the current page.",
"version": "0.5.6-posthog-2",
"version": "0.6.0-posthog.1",
"author": "Gidi Meir Morris",

@@ -6,0 +6,0 @@ "main": "lib/simmer.js",

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