Permalink
Browse files

- minor cosmetics. bump minor version for 'form' checks

  • Loading branch information...
1 parent 27c1f3f commit 1662d931e95759114fd960f981c846dbbc38ed4c @ded ded committed Dec 13, 2011
Showing with 21 additions and 23 deletions.
  1. +1 −1 package.json
  2. +10 −11 qwery.js
  3. +1 −1 qwery.min.js
  4. +9 −10 src/qwery.js
View
@@ -1,7 +1,7 @@
{
"name": "qwery"
, "description": "blazing fast CSS3 query selector engine"
- , "version": "3.2.0"
+ , "version": "3.2.2"
, "homepage": "https://github.com/ded/qwery"
, "author": "Dustin Diaz <dustin@dustindiaz.com> (http://dustindiaz.com)"
, "contributors": [
View
@@ -221,22 +221,21 @@
return (cand = crawl(el, tokens.length - 1, el)) && (!root || isAncestor(cand, root))
}
- function isNode(el) {
- return el && typeof el === 'object' && el.nodeType && (el.nodeType == 1 || el.nodeType == 9)
+ function isNode(el, t) {
+ return el && typeof el === 'object' && (t = el.nodeType) && (t == 1 || t == 9)
}
function uniq(ar) {
- var r = [], i = 0, j = 0, k, item, inIt
- for (; item = ar[i]; ++i) {
- inIt = false
- for (k = 0; k < r.length; ++k) {
- if (r[k] === item) {
- inIt = true; break
+ var a = [], i, j
+ o: for (i = 0; i < ar.length; ++i) {
+ for (j = 0; j < a.length; ++j) {
+ if (a[j] == ar[i]) {
+ continue o
}
}
- if (!inIt) r[j++] = item
+ a[a.length] = ar[i]
}
- return r
+ return a
}
function arrayLike(o) {
@@ -246,7 +245,7 @@
function normalizeRoot(root) {
if (!root) return doc
if (typeof root == 'string') return qwery(root)[0]
- if (arrayLike(root)) return root[0]
+ if (!root.nodeType && arrayLike(root)) return root[0]
return root
}
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -214,22 +214,21 @@
return (cand = crawl(el, tokens.length - 1, el)) && (!root || isAncestor(cand, root))
}
- function isNode(el) {
- return el && typeof el === 'object' && el.nodeType && (el.nodeType == 1 || el.nodeType == 9)
+ function isNode(el, t) {
+ return el && typeof el === 'object' && (t = el.nodeType) && (t == 1 || t == 9)
}
function uniq(ar) {
- var r = [], i = 0, j = 0, k, item, inIt
- for (; item = ar[i]; ++i) {
- inIt = false
- for (k = 0; k < r.length; ++k) {
- if (r[k] === item) {
- inIt = true; break
+ var a = [], i, j
+ o: for (i = 0; i < ar.length; ++i) {
+ for (j = 0; j < a.length; ++j) {
+ if (a[j] == ar[i]) {
+ continue o
}
}
- if (!inIt) r[j++] = item
+ a[a.length] = ar[i]
}
- return r
+ return a
}
function arrayLike(o) {

0 comments on commit 1662d93

Please sign in to comment.