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

@phenomnomnominal/tsquery

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@phenomnomnominal/tsquery - npm Package Compare versions

Comparing version 6.1.1 to 6.1.2

12

dist/src/matchers/nth-child.js

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

const traverse_1 = require("../traverse");
const sibling_1 = require("./sibling");
function nthChild(node, selector, ancestors) {

@@ -26,5 +27,12 @@ const { right } = selector;

}
const children = node.parent.getChildren();
return children.indexOf(node) === getIndex(children.length);
const keys = (0, sibling_1.getVisitorKeys)(node.parent || null);
return keys.some((key) => {
const prop = node.parent[key];
if (Array.isArray(prop)) {
const index = prop.indexOf(node);
return index >= 0 && index === getIndex(prop.length);
}
return false;
});
}
//# sourceMappingURL=nth-child.js.map

@@ -5,1 +5,2 @@ import type { Adjacent, Sibling } from 'esquery';

export declare function adjacent(node: Node, selector: Adjacent, ancestors: Array<Node>): boolean;
export declare function getVisitorKeys(node: Node | null): Array<string>;

3

dist/src/matchers/sibling.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.adjacent = exports.sibling = void 0;
exports.getVisitorKeys = exports.adjacent = exports.sibling = void 0;
const traverse_1 = require("../traverse");

@@ -67,2 +67,3 @@ function sibling(node, selector, ancestors) {

}
exports.getVisitorKeys = getVisitorKeys;
//# sourceMappingURL=sibling.js.map
{
"name": "@phenomnomnominal/tsquery",
"version": "6.1.1",
"version": "6.1.2",
"description": "Query TypeScript ASTs with the esquery API!",

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

Sorry, the diff of this file is not supported yet

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