Comparing version 1.0.3 to 1.0.4
@@ -1,5 +0,5 @@ | ||
// dom - v1.0.1 - MIT License | ||
// dom - v1.0.3 - MIT License | ||
// 2015 (c) OrderGroove Developers | ||
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | ||
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.dom = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | ||
(function(doc, w, undefined) { | ||
@@ -921,2 +921,3 @@ 'use strict'; | ||
},{}]},{},[1]); | ||
},{}]},{},[1])(1) | ||
}); |
@@ -1,1 +0,1 @@ | ||
!function e(t,n,r){function o(a,c){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!c&&u)return u(a,!0);if(i)return i(a,!0);var s=new Error("Cannot find module '"+a+"'");throw s.code="MODULE_NOT_FOUND",s}var f=n[a]={exports:{}};t[a][0].call(f.exports,function(e){var n=t[a][1][e];return o(n?n:e)},f,f.exports,e,t,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(e,t,n){!function(r,o,i){"use strict";var a=e("misc"),c={_doc:r,_window:o};c._ua=c._window.navigator.userAgent,c.$=function(e,t){var n,r;return t||(t=c._doc),(n=e.match(/^#([a-zA-Z0-9_\-]+)$/))?(r=c._doc.getElementById(n[1]),r?[r]:[]):(n=e.match(/^\.([a-zA-Z0-9_\-]+)$/),n&&t.getElementsByClassName?a.slice(t.getElementsByClassName(n[1]),0):a.slice(t.querySelectorAll(e),0))},c.addEvent=function(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},c.removeEvent=function(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=i},c.oneTimeEvent=function(e,t,n,r){c.addEvent(e,t,function o(){n.apply(this,arguments),c.removeEvent(e,t,o),"function"==typeof r&&c.addEvent(e,t,r)})},c.getEventTarget=function(e){var t=null;return e||(e=c._window.event),e.target?t=e.target:e.srcElement&&(t=e.srcElement),t&&3===t.nodeType&&(t=t.parentNode),t},c.scrollToEl=function(e){window.scroll(i,e.offsetTop)},c.getWindowYOffset=function(){return"undefined"!=typeof window.pageYOffset?window.pageYOffset:(c._doc.documentElement||c._doc.body.parentNode||c._doc.body).scrollTop},c._addClassShim=function(e,t){c.hasClass(e,t)||(e.className+=""===e.className?t:" "+t)},c._removeClassShim=function(e,t){e.className=e.className.replace(new RegExp("\\b"+t+"\\b","gi"),"")},c.addClass=function(e,t){if(a.isArray(t))for(var n=0;n<t.length;n++)c.addClass(e,t[n]);else document.documentElement.classList?e.classList.add(t):c._addClassShim(e,t);return c},c.removeClass=function(e,t){if(a.isArray(t))for(var n=0;n<t.length;n++)c.removeClass(e,t[n]);else document.documentElement.classList?e.classList.remove(t):c._removeClassShim(e,t);return c},c.hasClass=function(e,t){var n=e.className.split(/\s+/);return-1!==a.indexOf(n,t)},c.checkIsParent=function(e,t){for(var n=e;n!==document.documentElement;){if(n===t)return!0;n=n.parentNode}return!1},c.centerToElement=function(e,t){var n=e.getBoundingClientRect().left+e.offsetWidth/2;if(a.isArray(t))for(var r=0;r<t.length;r++)c.centerToElement(e,t[r]);else t.style.left=n-t.offsetWidth/2+"px"},c.findParentByClass=function(e,t){for(var n=e.parentNode;n.parentNode;){if(c.hasClass(n,t))return n;n=n.parentNode}return null},c.setCssProperty=function(e,t,n,r){if(e.style.setProperty)e.style.setProperty(t,n,r);else if(e.style.setAttribute(t,n),r){var o=new RegExp(encodeURIComponent(t)+"\\s*:\\s*"+encodeURIComponent(n)+"(\\s*;)?","gmi");e.style.cssText=e.style.cssText.replace(o,t+": "+n+" !"+r+";")}},c.ready=function(e){var t=!1,n=!0,r=o.document,i=r.documentElement,a=r.addEventListener,c=a?"addEventListener":"attachEvent",u=a?"removeEventListener":"detachEvent",s=a?"":"on",f=function(n){("readystatechange"!==n.type||"complete"===r.readyState)&&(("load"===n.type?o:r)[u](s+n.type,f,!1),!t&&(t=!0)&&e.call(o,n.type||n))},l=function(){try{i.doScroll("left")}catch(e){return void setTimeout(l,50)}f("poll")};if("complete"===r.readyState)e.call(o,"lazy");else{if(!a&&i.doScroll){try{n=!o.frameElement}catch(p){}n&&l()}r[c](s+"DOMContentLoaded",f,!1),r[c](s+"readystatechange",f,!1),o[c](s+"load",f,!1)}},c.ieVersion=function(){var e=c._ua.match(/rv:([0-9\.]+)/),t=!1;return e&&11===+e[1]&&(t=+e[1]),t||(t=-1!==c._ua.toLowerCase().indexOf("msie")?parseInt(c._ua.toLowerCase().split("msie")[1],10):!1),t}(),"function"==typeof define&&define.amd?define([],c):"object"==typeof n?t.exports=c:window.dom=c}(document,window)},{misc:2}],2:[function(e,t,n){!function(){"use strict";var e={};e.slice=function(){var e=Array.prototype.slice,t=!1;try{e.call(document.documentElement)}catch(n){t=!0}return t?function(e,t,n){var r,o=e.length,i=[];if(null===e)throw new TypeError("Array.prototype.slice called on null or undefined");if(t=null===t?0:t>=0?t:o-t,n=null===n?o:n>=0?n:o-n,e.charAt)for(r=t;n>r;r++)i.push(e.charAt(r));else for(r=t;n>r;r++)i.push(e[r]);return i}:function(t,n,r){return e.call(t,n,r)}}(),e.keys=function(){var e=Object.prototype.hasOwnProperty,t=!{toString:null}.propertyIsEnumerable("toString"),n=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],r=n.length;return function(o){if(Object.prototype.keys)return Object.keys(o);if("object"!=typeof o&&("function"!=typeof o||null===o))throw new TypeError("Object.keys called on non-object");var i,a,c=[];for(i in o)e.call(o,i)&&c.push(i);if(t)for(a=0;r>a;a++)e.call(o,n[a])&&c.push(n[a]);return c}}(),e.values=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t},e.toMap=function(e,t){var n,r,o,i,a={};for(n=0,r=e.length;r>n;n++)o=e[n],i="string"==typeof t?o[t]:t(o),null!==i&&void 0!==i&&(a[i]=o);return a},e.bind=function(e,t){if(e.bind)return e.bind.apply(e,Array.prototype.slice.call(arguments,1));if("function"!=typeof e)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var n=Array.prototype.slice.call(arguments,2),r=e,o=function(){},i=function(){return r.apply(this instanceof o&&t?e:t,n.concat(Array.prototype.slice.call(arguments)))};return o.prototype=e.prototype,i.prototype=new o,i},e.capitalize=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},e.indexOf=function(e,t,n){if(e.indexOf)return e.indexOf(t,n);if(null===e)throw new TypeError('"arr" is null or not defined');var r=this.length>>>0;for(n=+n||0,Math.abs(n)===1/0&&(n=0),0>n&&(n+=r,0>n&&(n=0));r>n;n++)if(e[n]===t)return n;return-1},e.contains=function(t,n,r){return-1!==e.indexOf(t,n,r)},e.extend=function(e){var t,n,r;for(t=1,n=arguments.length;n>t;t++)if(r=arguments[t])for(var o in r)e[o]=r[o];return e},e.deepExtend=function(t){var n,r,o;for(n=1,r=arguments.length;r>n;n++)if(o=arguments[n])for(var i in o)e.isObject(o[i])?(t.hasOwnProperty(i)||(t[i]={}),t[i]=e.deepExtend(t[i],o[i])):t[i]=o[i];return t},e.inherit=function(e,t){function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n},e.trim=function(e){return e.replace(/^\s+|\s+$/g,"")},e.map=function(e,t,n){if(Array.prototype.map&&e.map===Array.prototype.map)return e.map(t,n);if(void 0===e||null===e)throw new TypeError;var r=Object(e),o=r.length>>>0;if("function"!=typeof t)throw new TypeError;for(var i=new Array(o),a=0;o>a;a++)a in r&&(i[a]=t.call(n,r[a],a,r));return i},e.pick=function(t,n,r){for(var o={},i=0,a=n.length;a>i;i++)o[n[i]]=r&&"function"==typeof t[n[i]]?e.bind(t[n[i]],t):t[n[i]];return o},e.debounce=function(e,t){var n,r,o;return function(){o=this,r=arguments,n&&clearTimeout(n),n=setTimeout(function(){e.apply(o,r),n=null},t)}},e.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},e.isObject=function(e){return"[object Object]"===Object.prototype.toString.call(e)},e.containsObj=function(t,n){if(t===n)return!0;if(typeof t!=typeof n)return!1;if("function"==typeof t&&"function"==typeof n)return!0;if(t&&"object"==typeof n){var r;for(r in n)if(!e.containsObj(t[r],n[r]))return!1;return!0}return!1},e.random=function(e,t){return"undefined"==typeof t&&(t=e,e=0),e===t?e:e+Math.floor(Math.random()*(t-e+1))},e.shuffle=function(t){if(!e.isArray(t))return null;if(t.length>1){for(var n,r=t.length,o=new Array(r),i=0;r>i;i++)n=e.random(0,i),n!==i&&(o[i]=o[n]),o[n]=t[i];return o}return t.slice()},e.safeFn=function(e,t){return function(){try{return e.apply(this,arguments)}catch(n){if(t)try{return t(n)}catch(r){}return n}}},"function"==typeof define&&define.amd?define([],e):"object"==typeof n?t.exports=e:window._=e}()},{}]},{},[1]); | ||
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.dom=e()}}(function(){var e;return function t(e,n,r){function o(a,c){if(!n[a]){if(!e[a]){var u="function"==typeof require&&require;if(!c&&u)return u(a,!0);if(i)return i(a,!0);var f=new Error("Cannot find module '"+a+"'");throw f.code="MODULE_NOT_FOUND",f}var s=n[a]={exports:{}};e[a][0].call(s.exports,function(t){var n=e[a][1][t];return o(n?n:t)},s,s.exports,t,e,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(t,n,r){!function(o,i,a){"use strict";var c=t("misc"),u={_doc:o,_window:i};u._ua=u._window.navigator.userAgent,u.$=function(e,t){var n,r;return t||(t=u._doc),(n=e.match(/^#([a-zA-Z0-9_\-]+)$/))?(r=u._doc.getElementById(n[1]),r?[r]:[]):(n=e.match(/^\.([a-zA-Z0-9_\-]+)$/),n&&t.getElementsByClassName?c.slice(t.getElementsByClassName(n[1]),0):c.slice(t.querySelectorAll(e),0))},u.addEvent=function(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},u.removeEvent=function(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=a},u.oneTimeEvent=function(e,t,n,r){u.addEvent(e,t,function o(){n.apply(this,arguments),u.removeEvent(e,t,o),"function"==typeof r&&u.addEvent(e,t,r)})},u.getEventTarget=function(e){var t=null;return e||(e=u._window.event),e.target?t=e.target:e.srcElement&&(t=e.srcElement),t&&3===t.nodeType&&(t=t.parentNode),t},u.scrollToEl=function(e){window.scroll(a,e.offsetTop)},u.getWindowYOffset=function(){return"undefined"!=typeof window.pageYOffset?window.pageYOffset:(u._doc.documentElement||u._doc.body.parentNode||u._doc.body).scrollTop},u._addClassShim=function(e,t){u.hasClass(e,t)||(e.className+=""===e.className?t:" "+t)},u._removeClassShim=function(e,t){e.className=e.className.replace(new RegExp("\\b"+t+"\\b","gi"),"")},u.addClass=function(e,t){if(c.isArray(t))for(var n=0;n<t.length;n++)u.addClass(e,t[n]);else document.documentElement.classList?e.classList.add(t):u._addClassShim(e,t);return u},u.removeClass=function(e,t){if(c.isArray(t))for(var n=0;n<t.length;n++)u.removeClass(e,t[n]);else document.documentElement.classList?e.classList.remove(t):u._removeClassShim(e,t);return u},u.hasClass=function(e,t){var n=e.className.split(/\s+/);return-1!==c.indexOf(n,t)},u.checkIsParent=function(e,t){for(var n=e;n!==document.documentElement;){if(n===t)return!0;n=n.parentNode}return!1},u.centerToElement=function(e,t){var n=e.getBoundingClientRect().left+e.offsetWidth/2;if(c.isArray(t))for(var r=0;r<t.length;r++)u.centerToElement(e,t[r]);else t.style.left=n-t.offsetWidth/2+"px"},u.findParentByClass=function(e,t){for(var n=e.parentNode;n.parentNode;){if(u.hasClass(n,t))return n;n=n.parentNode}return null},u.setCssProperty=function(e,t,n,r){if(e.style.setProperty)e.style.setProperty(t,n,r);else if(e.style.setAttribute(t,n),r){var o=new RegExp(encodeURIComponent(t)+"\\s*:\\s*"+encodeURIComponent(n)+"(\\s*;)?","gmi");e.style.cssText=e.style.cssText.replace(o,t+": "+n+" !"+r+";")}},u.ready=function(e){var t=!1,n=!0,r=i.document,o=r.documentElement,a=r.addEventListener,c=a?"addEventListener":"attachEvent",u=a?"removeEventListener":"detachEvent",f=a?"":"on",s=function(n){("readystatechange"!==n.type||"complete"===r.readyState)&&(("load"===n.type?i:r)[u](f+n.type,s,!1),!t&&(t=!0)&&e.call(i,n.type||n))},l=function(){try{o.doScroll("left")}catch(e){return void setTimeout(l,50)}s("poll")};if("complete"===r.readyState)e.call(i,"lazy");else{if(!a&&o.doScroll){try{n=!i.frameElement}catch(p){}n&&l()}r[c](f+"DOMContentLoaded",s,!1),r[c](f+"readystatechange",s,!1),i[c](f+"load",s,!1)}},u.ieVersion=function(){var e=u._ua.match(/rv:([0-9\.]+)/),t=!1;return e&&11===+e[1]&&(t=+e[1]),t||(t=-1!==u._ua.toLowerCase().indexOf("msie")?parseInt(u._ua.toLowerCase().split("msie")[1],10):!1),t}(),"function"==typeof e&&e.amd?e([],u):"object"==typeof r?n.exports=u:window.dom=u}(document,window)},{misc:2}],2:[function(t,n,r){!function(){"use strict";var t={};t.slice=function(){var e=Array.prototype.slice,t=!1;try{e.call(document.documentElement)}catch(n){t=!0}return t?function(e,t,n){var r,o=e.length,i=[];if(null===e)throw new TypeError("Array.prototype.slice called on null or undefined");if(t=null===t?0:t>=0?t:o-t,n=null===n?o:n>=0?n:o-n,e.charAt)for(r=t;n>r;r++)i.push(e.charAt(r));else for(r=t;n>r;r++)i.push(e[r]);return i}:function(t,n,r){return e.call(t,n,r)}}(),t.keys=function(){var e=Object.prototype.hasOwnProperty,t=!{toString:null}.propertyIsEnumerable("toString"),n=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],r=n.length;return function(o){if(Object.prototype.keys)return Object.keys(o);if("object"!=typeof o&&("function"!=typeof o||null===o))throw new TypeError("Object.keys called on non-object");var i,a,c=[];for(i in o)e.call(o,i)&&c.push(i);if(t)for(a=0;r>a;a++)e.call(o,n[a])&&c.push(n[a]);return c}}(),t.values=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t},t.toMap=function(e,t){var n,r,o,i,a={};for(n=0,r=e.length;r>n;n++)o=e[n],i="string"==typeof t?o[t]:t(o),null!==i&&void 0!==i&&(a[i]=o);return a},t.bind=function(e,t){if(e.bind)return e.bind.apply(e,Array.prototype.slice.call(arguments,1));if("function"!=typeof e)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var n=Array.prototype.slice.call(arguments,2),r=e,o=function(){},i=function(){return r.apply(this instanceof o&&t?e:t,n.concat(Array.prototype.slice.call(arguments)))};return o.prototype=e.prototype,i.prototype=new o,i},t.capitalize=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},t.indexOf=function(e,t,n){if(e.indexOf)return e.indexOf(t,n);if(null===e)throw new TypeError('"arr" is null or not defined');var r=this.length>>>0;for(n=+n||0,Math.abs(n)===1/0&&(n=0),0>n&&(n+=r,0>n&&(n=0));r>n;n++)if(e[n]===t)return n;return-1},t.contains=function(e,n,r){return-1!==t.indexOf(e,n,r)},t.extend=function(e){var t,n,r;for(t=1,n=arguments.length;n>t;t++)if(r=arguments[t])for(var o in r)e[o]=r[o];return e},t.deepExtend=function(e){var n,r,o;for(n=1,r=arguments.length;r>n;n++)if(o=arguments[n])for(var i in o)t.isObject(o[i])?(e.hasOwnProperty(i)||(e[i]={}),e[i]=t.deepExtend(e[i],o[i])):e[i]=o[i];return e},t.inherit=function(e,t){function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n},t.trim=function(e){return e.replace(/^\s+|\s+$/g,"")},t.map=function(e,t,n){if(Array.prototype.map&&e.map===Array.prototype.map)return e.map(t,n);if(void 0===e||null===e)throw new TypeError;var r=Object(e),o=r.length>>>0;if("function"!=typeof t)throw new TypeError;for(var i=new Array(o),a=0;o>a;a++)a in r&&(i[a]=t.call(n,r[a],a,r));return i},t.pick=function(e,n,r){for(var o={},i=0,a=n.length;a>i;i++)o[n[i]]=r&&"function"==typeof e[n[i]]?t.bind(e[n[i]],e):e[n[i]];return o},t.debounce=function(e,t){var n,r,o;return function(){o=this,r=arguments,n&&clearTimeout(n),n=setTimeout(function(){e.apply(o,r),n=null},t)}},t.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},t.isObject=function(e){return"[object Object]"===Object.prototype.toString.call(e)},t.containsObj=function(e,n){if(e===n)return!0;if(typeof e!=typeof n)return!1;if("function"==typeof e&&"function"==typeof n)return!0;if(e&&"object"==typeof n){var r;for(r in n)if(!t.containsObj(e[r],n[r]))return!1;return!0}return!1},t.random=function(e,t){return"undefined"==typeof t&&(t=e,e=0),e===t?e:e+Math.floor(Math.random()*(t-e+1))},t.shuffle=function(e){if(!t.isArray(e))return null;if(e.length>1){for(var n,r=e.length,o=new Array(r),i=0;r>i;i++)n=t.random(0,i),n!==i&&(o[i]=o[n]),o[n]=e[i];return o}return e.slice()},t.safeFn=function(e,t){return function(){try{return e.apply(this,arguments)}catch(n){if(t)try{return t(n)}catch(r){}return n}}},"function"==typeof e&&e.amd?e([],t):"object"==typeof r?n.exports=t:window._=t}()},{}]},{},[1])(1)}); |
@@ -43,3 +43,6 @@ (function() { | ||
gulp.task('browserify:src', [ 'test' ], function() { | ||
return browserify({entries:[ paths.src ]}) | ||
return browserify({ | ||
entries:[ paths.src ], | ||
standalone: pkg.title | ||
}) | ||
.bundle() | ||
@@ -46,0 +49,0 @@ .pipe(source(pkg.title + '.js')) |
@@ -7,3 +7,3 @@ { | ||
"copyright": "2015", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Library with DOM manipulation methods", | ||
@@ -10,0 +10,0 @@ "private": false, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
73610
1685