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

queried

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

queried - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

lib/pseudos/not.js

3

css4.js

@@ -31,2 +31,5 @@ /**

q.registerFilter('has', require('./lib/pseudos/has'));
//polyfilled :has causes artificial :not to make :not(:has(...)).
q.registerFilter('not', require('./lib/pseudos/not'));
}

@@ -33,0 +36,0 @@

7

index.js

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

/* Export css4 by default */
module.exports = require('./css4');
/** Export css4 by default */
module.exports = require('./css4');
/** Helper methods */
module.exports.matches = require('./lib/pseudos/matches');

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

//TODO: jquery selectors
//TODO: test order of query result (should be compliant with querySelectorAll)
//TODO: third query param - include self
//TODO: .closest, .all, .next, .prev, .parent, .mathes etc methods - all with the same API: query(selector, [el], [incSelf], [within]).
//TODO: .all('.x', [a, b, c]);

@@ -38,2 +42,4 @@

function registerFilter(name, filter){
if (pseudos[name]) return;
//save pseudo filter

@@ -60,2 +66,4 @@ pseudos[name] = filter;

function registerMapper(name, mapper){
if (pseudos[name]) return;
pseudos[name] = mapper;

@@ -141,6 +149,4 @@ mappers[name] = true;

//pre-select elements before pseudo
var preSelector = paren.stringify(parts[0].slice(0, match.index), parts);
if (preSelector) {
list = qList(list, preSelector);
}
var preSelector = paren.stringify(parts[0].slice(0, match.index), parts) || '*';
list = qList(list, preSelector);

@@ -147,0 +153,0 @@ //apply pseudo filter/mapper on the list

@@ -1,1 +0,8 @@

module.exports = require('matches-selector');
var q = require('..');
/** CSS4 matches */
function matches(el, selector){
return q.all(selector, el.parentNode).indexOf(el) > -1;
}
module.exports = matches;
{
"name": "queried",
"version": "1.2.1",
"version": "1.2.2",
"description": "Query selector CSS4 +",

@@ -5,0 +5,0 @@ "main": "css4.js",

@@ -45,10 +45,13 @@ # queried [![Build Status](https://travis-ci.org/dfcreative/queried.svg?branch=master)](https://travis-ci.org/dfcreative/queried) [![Code Climate](https://codeclimate.com/github/dfcreative/queried/badges/gpa.svg)](https://codeclimate.com/github/dfcreative/queried)

| _query.all(selector, el=document)_ | Query list of elements by selector |
| _query.registerFilter(name, filterFn)_ | Register a new filtering pseudo |
| _query.registerMapper(name, mapperFn)_ | Register a new mapping pseudo |
| _query.registerFilter(name, filterFn)_ | Register a filtering pseudo |
| _query.registerMapper(name, mapperFn)_ | Register a mapping pseudo |
# Analogs
* [sel](https://github.com/amccollum/sel) — a more complete CSS4 selector, lacks of mapping pseudos.
[![NPM](https://nodei.co/npm/queried.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/queried/)
<a href="UNLICENSE"><img src="http://upload.wikimedia.org/wikipedia/commons/6/62/PD-icon.svg" width="20"/></a>
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