Socket
Socket
Sign inDemoInstall

domel

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.1 to 0.0.2

8

dist/main.js

@@ -367,7 +367,5 @@ (function() {

if (typeof exports !== 'undefined') {
if (typeof module !== 'undefined' && module.exports) {
exports = module.exports = domHelper;
return;
}
if (typeof module !== 'undefined' && module.exports) {
exports = module.exports = domHelper;
} else if (typeof exports !== 'undefined') {
exports.domHelper = domHelper;

@@ -374,0 +372,0 @@ } else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {

@@ -1,3 +0,3 @@

/*!domel - v0.0.1
/*!domel - v0.0.2
*/
(function(){var a,b,c,d,e,f,g=[].slice,h=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};if(f=this,e=["byClass","byId"],b=function(a,b,d){return null==d&&(d=0),function(){var e;return e=1<=arguments.length?g.call(arguments,0):[],e.splice(d,0,b),a.apply(c,e)}},a=function(a,d){var f,g,i,j;if(null==d&&(d="d"),null==a)return a;if(null!=a[d])return a;for(a[d]={},j=Object.keys(c),f=0,g=j.length;g>f;f++)i=j[f],h.call(e,i)<0&&(a[d][i]=b(c[i],a));return a[d].find=b(c,a,1),a[d].byId=b(c.byId,a,1),a[d].byClass=b(c.byClass,a,1),a},c=function(b,d,e){var f,g,h,i,j;if(null==d&&(d=document),null==e&&(e=!1),i=b.split(" "),i.every(function(a){var b;return"."===(b=a[0])||"#"===b})){for(;i.length;)if(h=null!=(j=i.splice(0,1))?j[0]:void 0)switch(h[0]){case".":d=c.byClass(h,d,e);break;case"#":d=c.byId(h,d,e)}return d}return g=d.querySelectorAll(b),e?a(null!=g?g[0]:void 0):function(){var b,c,d;for(d=[],b=0,c=g.length;c>b;b++)f=g[b],d.push(a(f));return d}()},c.data=function(a,b){return null!=b?a.dataset[b]:a.dataset},c.byClass=function(b,c,d){var e,f;return null==c&&(c=document),null==d&&(d=!1),"."===b[0]&&(b=b.slice(1)),f=c.getElementsByClassName(b),d?a(null!=f?f[0]:void 0):function(){var b,c,d;for(d=[],b=0,c=f.length;c>b;b++)e=f[b],d.push(a(e));return d}()},c.byId=function(b,c){return null==c&&(c=document),"#"===b[0]&&(b=b.slice(1)),a(c.getElementById(b))},c.last=function(b,d){var e;for(e=b.childNodes.length-1;e>=0;){if(c.is(b.childNodes[e],d))return a(b.childNodes[e]);e--}return null},c.parent=function(b,d){var e;if(null==d)return a(b.parentNode);for(e=b;null!=e.parentNode;)if(e=e.parentNode,c.is(e,d))return a(e);return null},c.first=function(b,d){var e,f,g,h,i;for(f=b.childNodes.length-1,i=b.childNodes,g=0,h=i.length;h>g;g++)if(e=i[g],c.is(e,d))return a(e);return null},c.children=function(b,d){var e,f,g,h,i,j;for(f=[],g=b.childNodes.length-1,j=b.childNodes,h=0,i=j.length;i>h;h++)e=j[h],c.is(e,d)&&f.push(a(e));return f},c.countChildren=function(a,b){return c.children(a,b).length},c.is=function(a,b){return"."===b[0]?c.hasClass(a,b.slice(1)):"#"===b[0]?c.hasId(a,b.slice(1)):!1},c.hasClass=function(a,b){var c;return null!=a.classList?a.classList.contains(b):null==(null!=a?a.className:void 0)?!1:h.call((null!=a&&null!=(c=a.className)?c.split(" "):void 0)||[],b)>=0?!0:!1},c.hide=function(a){return null==(null!=a?a.style:void 0)?null:(a.style.display="none",a)},c.show=function(a,b){return null==b&&(b="block"),null==(null!=a?a.style:void 0)?null:(a.style.display=b,a)},c.addClass=function(a,b){var c;if(!this.hasClass(a,b))return c=a.className,c.length?(a.className+=" "+b,a):void(a.className=b)},c.removeClass=function(a,b){var c,d;if(this.hasClass(a,b))return c=a.className,d=new RegExp("\\s?\\b"+b+"\\b","g"),c=c.replace(d,""),a.className=c,a},c.hasId=function(a,b){return(null!=a?a.id:void 0)===b?!0:!1},c.append=function(a,b){var c,d,e,f,g;for(c=document.createElement("div"),c.innerHTML=b,g=c.childNodes,e=0,f=g.length;f>e;e++)d=g[e],null!=(null!=d?d.tagName:void 0)&&a.appendChild(d);return a},c.prepend=function(a,b){var d,e,f,g,h,i,j;if(d=null!=(i=a.childNodes)?i[0]:void 0,null==d)return void c.append(a,b);for(e=document.createElement("div"),e.innerHTML=b,f=d,j=e.childNodes,h=j.length-1;h>=0;h+=-1)g=j[h],null!=(null!=g?g.tagName:void 0)&&(a.insertBefore(g,f),f=g);return a},c.remove=function(a){var b;if(a instanceof Element&&a.parentElement.removeChild(a),a instanceof HTMLCollection)for(b=a.length-1;b>=0;)a[b]&&a[b].parentElement&&a[b].parentElement.removeChild(a[b]),b--;return a},c.on=function(a,b,c){return null!=a?(null!=a.addEventListener?a.addEventListener(b,c,!1):null!=a.attachEvent?a.attachEvent("on"+b,c):a["on"+b]=c,a):void 0},c.off=function(a,b,c){return null!=a?(null!=a.removeEventListener?a.removeEventListener(b,c,!1):null!=a.detachEvent?a.detachEvent("on"+b,c):delete a["on"+b],a):void 0},c.emit=function(a,b){var c;return c=document.createEvent("Event"),c.initEvent(b,!0,!1),a.dispatchEvent(c),c},"undefined"!=typeof d){if("undefined"!=typeof module&&module.exports)return void(d=module.exports=c);d.domHelper=c}else{if("function"==typeof define&&"object"==typeof define.amd&&define.amd)return void define(function(){return c});f.domHelper=c}}).call(this);
(function(){var a,b,c,d,e,f,g=[].slice,h=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};if(f=this,e=["byClass","byId"],b=function(a,b,d){return null==d&&(d=0),function(){var e;return e=1<=arguments.length?g.call(arguments,0):[],e.splice(d,0,b),a.apply(c,e)}},a=function(a,d){var f,g,i,j;if(null==d&&(d="d"),null==a)return a;if(null!=a[d])return a;for(a[d]={},j=Object.keys(c),f=0,g=j.length;g>f;f++)i=j[f],h.call(e,i)<0&&(a[d][i]=b(c[i],a));return a[d].find=b(c,a,1),a[d].byId=b(c.byId,a,1),a[d].byClass=b(c.byClass,a,1),a},c=function(b,d,e){var f,g,h,i,j;if(null==d&&(d=document),null==e&&(e=!1),i=b.split(" "),i.every(function(a){var b;return"."===(b=a[0])||"#"===b})){for(;i.length;)if(h=null!=(j=i.splice(0,1))?j[0]:void 0)switch(h[0]){case".":d=c.byClass(h,d,e);break;case"#":d=c.byId(h,d,e)}return d}return g=d.querySelectorAll(b),e?a(null!=g?g[0]:void 0):function(){var b,c,d;for(d=[],b=0,c=g.length;c>b;b++)f=g[b],d.push(a(f));return d}()},c.data=function(a,b){return null!=b?a.dataset[b]:a.dataset},c.byClass=function(b,c,d){var e,f;return null==c&&(c=document),null==d&&(d=!1),"."===b[0]&&(b=b.slice(1)),f=c.getElementsByClassName(b),d?a(null!=f?f[0]:void 0):function(){var b,c,d;for(d=[],b=0,c=f.length;c>b;b++)e=f[b],d.push(a(e));return d}()},c.byId=function(b,c){return null==c&&(c=document),"#"===b[0]&&(b=b.slice(1)),a(c.getElementById(b))},c.last=function(b,d){var e;for(e=b.childNodes.length-1;e>=0;){if(c.is(b.childNodes[e],d))return a(b.childNodes[e]);e--}return null},c.parent=function(b,d){var e;if(null==d)return a(b.parentNode);for(e=b;null!=e.parentNode;)if(e=e.parentNode,c.is(e,d))return a(e);return null},c.first=function(b,d){var e,f,g,h,i;for(f=b.childNodes.length-1,i=b.childNodes,g=0,h=i.length;h>g;g++)if(e=i[g],c.is(e,d))return a(e);return null},c.children=function(b,d){var e,f,g,h,i,j;for(f=[],g=b.childNodes.length-1,j=b.childNodes,h=0,i=j.length;i>h;h++)e=j[h],c.is(e,d)&&f.push(a(e));return f},c.countChildren=function(a,b){return c.children(a,b).length},c.is=function(a,b){return"."===b[0]?c.hasClass(a,b.slice(1)):"#"===b[0]?c.hasId(a,b.slice(1)):!1},c.hasClass=function(a,b){var c;return null!=a.classList?a.classList.contains(b):null==(null!=a?a.className:void 0)?!1:h.call((null!=a&&null!=(c=a.className)?c.split(" "):void 0)||[],b)>=0?!0:!1},c.hide=function(a){return null==(null!=a?a.style:void 0)?null:(a.style.display="none",a)},c.show=function(a,b){return null==b&&(b="block"),null==(null!=a?a.style:void 0)?null:(a.style.display=b,a)},c.addClass=function(a,b){var c;if(!this.hasClass(a,b))return c=a.className,c.length?(a.className+=" "+b,a):void(a.className=b)},c.removeClass=function(a,b){var c,d;if(this.hasClass(a,b))return c=a.className,d=new RegExp("\\s?\\b"+b+"\\b","g"),c=c.replace(d,""),a.className=c,a},c.hasId=function(a,b){return(null!=a?a.id:void 0)===b?!0:!1},c.append=function(a,b){var c,d,e,f,g;for(c=document.createElement("div"),c.innerHTML=b,g=c.childNodes,e=0,f=g.length;f>e;e++)d=g[e],null!=(null!=d?d.tagName:void 0)&&a.appendChild(d);return a},c.prepend=function(a,b){var d,e,f,g,h,i,j;if(d=null!=(i=a.childNodes)?i[0]:void 0,null==d)return void c.append(a,b);for(e=document.createElement("div"),e.innerHTML=b,f=d,j=e.childNodes,h=j.length-1;h>=0;h+=-1)g=j[h],null!=(null!=g?g.tagName:void 0)&&(a.insertBefore(g,f),f=g);return a},c.remove=function(a){var b;if(a instanceof Element&&a.parentElement.removeChild(a),a instanceof HTMLCollection)for(b=a.length-1;b>=0;)a[b]&&a[b].parentElement&&a[b].parentElement.removeChild(a[b]),b--;return a},c.on=function(a,b,c){return null!=a?(null!=a.addEventListener?a.addEventListener(b,c,!1):null!=a.attachEvent?a.attachEvent("on"+b,c):a["on"+b]=c,a):void 0},c.off=function(a,b,c){return null!=a?(null!=a.removeEventListener?a.removeEventListener(b,c,!1):null!=a.detachEvent?a.detachEvent("on"+b,c):delete a["on"+b],a):void 0},c.emit=function(a,b){var c;return c=document.createEvent("Event"),c.initEvent(b,!0,!1),a.dispatchEvent(c),c},"undefined"!=typeof module&&module.exports)d=module.exports=c;else if("undefined"!=typeof d)d.domHelper=c;else{if("function"==typeof define&&"object"==typeof define.amd&&define.amd)return void define(function(){return c});f.domHelper=c}}).call(this);

@@ -367,7 +367,5 @@ (function() {

if (typeof exports !== 'undefined') {
if (typeof module !== 'undefined' && module.exports) {
exports = module.exports = domHelper;
return;
}
if (typeof module !== 'undefined' && module.exports) {
exports = module.exports = domHelper;
} else if (typeof exports !== 'undefined') {
exports.domHelper = domHelper;

@@ -374,0 +372,0 @@ } else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {

{
"name": "domel",
"version": "0.0.1",
"version": "0.0.2",
"description": "A simple dom helper if you want to get rid of jQuery",

@@ -5,0 +5,0 @@ "keywords": [ "dom", "browser", "helper", "jquery", "selector", "traversing" ],

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc