Sha256: 389bcc15112f879ac6461d9a67082d2ae3392a58e7872d7ffb43bc5a03a3f2c9

Contents?: true

Size: 493 Bytes

Versions: 6

Compression:

Stored size: 493 Bytes

Contents

function one(selector, el) {
  return el.querySelector(selector);
}

exports = module.exports = function(selector, el){
  el = el || document;
  return one(selector, el);
};

exports.all = function(selector, el){
  el = el || document;
  return el.querySelectorAll(selector);
};

exports.engine = function(obj){
  if (!obj.one) throw new Error('.one callback required');
  if (!obj.all) throw new Error('.all callback required');
  one = obj.one;
  exports.all = obj.all;
  return exports;
};

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ende-0.5.6 components/component/query/0.0.3/index.js
ende-0.5.5 components/component/query/0.0.3/index.js
ende-0.5.4 components/component/query/0.0.3/index.js
ende-0.5.3 components/component/query/0.0.3/index.js
ende-0.5.2 components/component/query/0.0.3/index.js
ende-0.5.1 components/component/query/0.0.3/index.js