Comparing version 1.3.3 to 1.4.0
@@ -17,3 +17,2 @@ /** | ||
var unique = require('array-unique'); | ||
var doc = require('get-doc'); | ||
var getUid = require('get-uid'); | ||
@@ -25,2 +24,3 @@ var paren = require('parenthesis'); | ||
var arrayify = require('arrayify-compact'); | ||
var doc = require('get-doc'); | ||
@@ -93,3 +93,3 @@ | ||
//ignore non-queryable containers | ||
if (!el) el = [doc]; | ||
if (!el) el = [querySingle.document]; | ||
@@ -101,5 +101,5 @@ //treat passed list | ||
//if element isn’t a node - make it doc | ||
//if element isn’t a node - make it q.document | ||
else if (!el.querySelector) { | ||
el = [doc]; | ||
el = [querySingle.document]; | ||
} | ||
@@ -206,2 +206,6 @@ | ||
querySingle.registerMapper = registerMapper; | ||
/** Default document representative to use for DOM */ | ||
querySingle.document = doc; | ||
module.exports = querySingle; |
var q = require('..'); | ||
var doc = require('get-doc'); | ||
@@ -7,5 +6,6 @@ /** CSS4 matches */ | ||
if (!el.parentNode) { | ||
var fragment = doc.createDocumentFragment(); | ||
var fragment = q.document.createDocumentFragment(); | ||
fragment.appendChild(el); | ||
} | ||
return q.all(selector, el.parentNode).indexOf(el) > -1; | ||
@@ -12,0 +12,0 @@ } |
@@ -1,5 +0,5 @@ | ||
var doc = require('get-doc'); | ||
var q = require('..'); | ||
module.exports = function root(el){ | ||
return el === doc.documentElement; | ||
return el === q.document.documentElement; | ||
}; |
{ | ||
"name": "queried", | ||
"version": "1.3.3", | ||
"version": "1.4.0", | ||
"description": "Query selector CSS4 +", | ||
@@ -33,7 +33,6 @@ "main": "css4.js", | ||
"require-stub": "^2.2.4", | ||
"mocha": "^2.1.0", | ||
"mocha": "~2.1.0", | ||
"mochify": "^2.2.0", | ||
"assert": "^1.3.0", | ||
"chai": "~1.10.0", | ||
"domify": "~1.3.1" | ||
"chai": "^1.10.0" | ||
}, | ||
@@ -40,0 +39,0 @@ "repository": { |
@@ -48,2 +48,3 @@ # 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.registerMapper(name, mapperFn)_ | Register a mapping pseudo | | ||
| _query.document_ | Default document to use as fallback. Set it up, for exampl, as `q.document = require('min-document')`, if you need custom DOM. | | ||
@@ -50,0 +51,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11164
5
249
54