Comparing version 0.1.0-beta.12 to 0.1.0-beta.13
/*! | ||
* homey v0.1.0-beta.12 | ||
* homey v0.1.0-beta.13 | ||
* https://github.com/demiazz/homey | ||
@@ -4,0 +4,0 @@ * |
@@ -1,3 +0,3 @@ | ||
/*! homey v0.1.0-beta.12 | https://github.com/demiazz/homey | (c) Alexey Plutalov | MIT license */ | ||
/*! homey v0.1.0-beta.13 | https://github.com/demiazz/homey | (c) Alexey Plutalov | MIT license */ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define("homey",["exports"],t):t(e.homey={})}(this,function(e){"use strict";function t(e,t){return e.classList.contains(t)}function n(e,n){var r=!t(e,n);return r&&e.classList.add(n),r}function r(e,t){return Array.prototype.slice.call(e,t)}function o(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)?e[t]:n}function u(e){return Array.prototype.slice.call(e)}function c(e){return e.parentElement}function i(e,t,n){t.insertBefore(n,e.nextSibling)}function a(e,t){e.appendChild(t)}function f(e,t,n){t.insertBefore(n,e)}function s(e,t){return T.call(e,t)}function l(e,t){for(var n="string"==typeof t?function(e){return s(e,t)}:t,r=c(e);r;){if(n(r))return r;r=c(r)}return null}function d(e,t){return s(e,t)?e:l(e,t)}function v(e,t){return e.closest(t)}function p(e){return e.dataset}function h(e){return[].slice.call(e.attributes).reduce(function(e,t){var n=t.name;return/^data-(.+)/.test(n)&&(e[n.substr(5).replace(/-\w/g,function(e){return e[1].toUpperCase()})]=t.value),e},{})}function m(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return e.addEventListener(t,n,r),function(){return e.removeEventListener(t,n,r)}}function y(e,t){return e.hasAttribute(t)}function g(e){for(var t=[],n=c(e);n;)t.push(n),n=c(n);return t}function b(e,t){e.insertBefore(t,e.firstChild)}function E(e,t){e.removeAttribute(t)}function A(e,n){var r=t(e,n);return r&&e.classList.remove(n),r}function C(e,r,o){return((3===arguments.length?o:!t(e,r))?n:A)(e,r)}function w(e,t){return Object.keys(t).reduce(function(n,r){var o=t[r];return C(e,r,o)||n},!1)}var L=window.document.body,T=function(){var e=document.createElement("div");return e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector}(),M=document.createElement("div").closest?v:d,j=document.createElement("div").dataset?p:h,x="function"==typeof window.CustomEvent?function(e,t,n,r){return new CustomEvent(e,{bubbles:n,cancelable:r,detail:t})}:function(e,t,n,r){var o=document.createEvent("CustomEvent");return o.initCustomEvent(e,n,r,t),o},H=window.document.documentElement;e.addClass=n,e.addClasses=function(e){return Array.prototype.slice.call(arguments,1).reduce(function(t,r){return n(e,r)||t},!1)},e.after=function(e){var t=c(e);if(!t)throw new Error("The element has no parent");r(arguments,1).reverse().forEach(function(n){"string"==typeof n?e.insertAdjacentHTML("afterend",n):n instanceof Node?i(e,t,n):u(n).reverse().forEach(function(n){i(e,t,n)})})},e.append=function(e){r(arguments,1).forEach(function(t){"string"==typeof t?e.insertAdjacentHTML("beforeend",t):t instanceof Node?a(e,t):u(t).forEach(function(t){a(e,t)})})},e.before=function(e){var t=c(e);if(!t)throw new Error("The element has no parent");r(arguments,1).forEach(function(n){"string"==typeof n?e.insertAdjacentHTML("beforebegin",n):n instanceof Node?f(e,t,n):u(n).forEach(function(n){f(e,t,n)})})},e.body=L,e.closest=function(e,t){return"string"==typeof t?M(e,t):t(e)?e:l(e,t)},e.dataset=function(e){return j(e)},e.delegate=function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return m(e,n,function(n){if(n.target instanceof Element)for(var o=n.target;o;){if(s(o,t))return n.delegateTarget=e,r(n),void delete n.delegateTarget;if(o===e)return;o=c(o)}},o)},e.dispatch=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{bubbles:!0,cancelable:!0},u=o(r,"bubbles",!0),c=o(r,"cancelable",!0),i=x(t,n,u,c);return e.dispatchEvent(i)},e.getAttr=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return y(e,t)?e.getAttribute(t):n},e.getHtml=function(e){return e.innerHTML},e.getText=function(e){return e.textContent},e.hasAttr=y,e.hasClass=t,e.html=H,e.matches=s,e.on=m,e.once=function(e,t,n){function r(u){e.removeEventListener(t,r,o),n(u)}var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return m(e,t,r,o)},e.parent=c,e.parentBy=l,e.parents=g,e.parentsBy=function(e,t){var n="string"==typeof t?function(e){return s(e,t)}:t;return g(e).filter(n)},e.prepend=function(e){r(arguments,1).reverse().forEach(function(t){"string"==typeof t?e.insertAdjacentHTML("afterbegin",t):t instanceof Node?b(e,t):u(t).reverse().forEach(function(t){b(e,t)})})},e.query=function(e,t){return e.querySelector(t)},e.queryAll=function(e,t){return u(e.querySelectorAll(t))},e.remove=function(e){var t=c(e);return!!t&&(t.removeChild(e),!0)},e.removeAttr=E,e.removeClass=A,e.removeClasses=function(e){return Array.prototype.slice.call(arguments,1).reduce(function(t,n){return A(e,n)||t},!1)},e.setAttr=function(e,t,n){null===n?E(e,t):e.setAttribute(t,n)},e.setHtml=function(e,t){e.innerHTML=t},e.setText=function(e,t){e.textContent=t},e.toggleClass=C,e.toggleClasses=function(e){return Array.prototype.slice.call(arguments,1).reduce(function(t,n){return("string"==typeof n?C(e,n):w(e,n))||t},!1)},Object.defineProperty(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=homey.min.js.map |
{ | ||
"name": "homey", | ||
"version": "0.1.0-beta.12", | ||
"version": "0.1.0-beta.13", | ||
"description": "Homey shortcut's collection for DOM API", | ||
@@ -42,4 +42,5 @@ "license": "MIT", | ||
"docs": "node build/docs.js", | ||
"version": "yarn run build && yarn run docs && git add -A README.md", | ||
"postversion": "yarn run clean", | ||
"prepack": "yarn run build", | ||
"postpack": "yarn run clean", | ||
"version": "yarn run docs && git add -A README.md", | ||
"lint-staged": "$(yarn bin)/lint-staged" | ||
@@ -46,0 +47,0 @@ }, |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
117279
84
1496
205
1
2
0
32