Skip to content

Commit

Permalink
- minor cosmetics. bump minor version for 'form' checks
Browse files Browse the repository at this point in the history
  • Loading branch information
ded committed Dec 13, 2011
1 parent 27c1f3f commit 1662d93
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 23 deletions.
2 changes: 1 addition & 1 deletion package.json
@@ -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": [
Expand Down
21 changes: 10 additions & 11 deletions qwery.js
Expand Up @@ -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) {
Expand All @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion qwery.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 9 additions & 10 deletions src/qwery.js
Expand Up @@ -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) {
Expand Down

0 comments on commit 1662d93

Please sign in to comment.