Skip to content

Commit

Permalink
apply same code style
Browse files Browse the repository at this point in the history
  • Loading branch information
dciccale committed Oct 8, 2015
1 parent daf1c32 commit dfee3cb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Kimbo.define('query', function (_) {
var NAME_RE = /^\[name=["']?([\w\-]+)["']?\]$/;

// Use querySelectoAll but optimize for id, class, tagName and name
var _find = function (element, selector) {
function _find(element, selector) {
var els = [], sel;

// #id
Expand All @@ -35,14 +35,14 @@ Kimbo.define('query', function (_) {

// Return NodeList/Node as an array
return _.slice.call(els);
};
}

// DOM Level 4 contains improved
var _contains = function (el1, el2) {
function _contains(el1, el2) {
return (el1 === window && (el2 && (el2 === window || el2.nodeType))) ||
((el1 && el1.nodeType) &&
(el2 && el2.nodeType)) ? (el1.contains ? el1.contains(el2) : true) : false;
};
}

return {
find: _find,
Expand Down

0 comments on commit dfee3cb

Please sign in to comment.