Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

homey

Package Overview
Dependencies
Maintainers
1
Versions
205
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

homey - npm Package Compare versions

Comparing version 0.1.0-beta.6 to 0.1.0-beta.7

lib/manipulation/append.js

3

d.ts/homey.d.ts

@@ -9,2 +9,3 @@ /* Types */

export type EventType = string;
export type Insertable = string | Node | NodeList;

@@ -42,2 +43,4 @@ type EventOptions = { bubbles?: boolean, cancelable?: boolean, detail?: any };

export function append(element: Element, ...insertable: Insertable[]): void;
export function prepend(element: Element, ...insertable: Insertable[]): void;
export function remove(element: Element): boolean;

@@ -44,0 +47,0 @@ export function setHtml(element: Element, html: string): void;

/*!
* homey v0.1.0-beta.6
* homey v0.1.0-beta.7
* https://github.com/demiazz/homey

@@ -273,2 +273,78 @@ *

function appendString(element, insertable) {
element.insertAdjacentHTML("beforeend", insertable);
}
function appendNode(element, insertable) {
element.appendChild(insertable);
}
function appendNodeList(element, insertable) {
toArray(insertable).forEach(function(node) {
appendNode(element, node);
});
}
function append(element) {
for (
var _len = arguments.length,
insertables = Array(_len > 1 ? _len - 1 : 0),
_key = 1;
_key < _len;
_key++
) {
insertables[_key - 1] = arguments[_key];
}
insertables.forEach(function(insertable) {
if (typeof insertable === "string") {
appendString(element, insertable);
} else if (insertable instanceof Node) {
appendNode(element, insertable);
} else {
appendNodeList(element, insertable);
}
});
element.normalize();
}
function prependString(element, insertable) {
element.insertAdjacentHTML("afterbegin", insertable);
}
function prependNode(element, insertable) {
element.insertBefore(insertable, element.firstChild);
}
function prependNodeList(element, insertable) {
toArray(insertable).reverse().forEach(function(node) {
prependNode(element, node);
});
}
function prepend(element) {
for (
var _len = arguments.length,
insertables = Array(_len > 1 ? _len - 1 : 0),
_key = 1;
_key < _len;
_key++
) {
insertables[_key - 1] = arguments[_key];
}
insertables.reverse().forEach(function(insertable) {
if (typeof insertable === "string") {
prependString(element, insertable);
} else if (insertable instanceof Node) {
prependNode(element, insertable);
} else {
prependNodeList(element, insertable);
}
});
element.normalize();
}
function remove(element) {

@@ -402,2 +478,4 @@ var parentElement = parent(element);

exports.once = once;
exports.append = append;
exports.prepend = prepend;
exports.remove = remove;

@@ -404,0 +482,0 @@ exports.setHtml = setHtml;

4

dist/homey.min.js

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

/*! homey v0.1.0-beta.6 | 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=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){for(var t=arguments.length,r=Array(t>1?t-1:0),u=1;u<t;u++)r[u-1]=arguments[u];return r.reduce(function(t,r){return n(e,r)||t},!1)}function u(e,n){var r=t(e,n);return r&&e.classList.remove(n),r}function o(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.reduce(function(t,n){return u(e,n)||t},!1)}function c(e,r,o){return((3===arguments.length?o:!t(e,r))?n:u)(e,r)}function i(e,t){return Object.keys(t).reduce(function(n,r){var u=t[r];return c(e,r,u)||n},!1)}function a(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.reduce(function(t,n){return("string"==typeof n?c(e,n):i(e,n))||t},!1)}function s(e){return e.dataset}function f(e){return[].slice.call(e.attributes).reduce(function(e,t){var n=t.name,r=t.value;return/^data-(.+)/.test(n)&&(e[n.substr(5).replace(/-\w/g,function(e){return e[1].toUpperCase()})]=r),e},{})}function l(e){return z(e)}function d(e,t){return U.call(e,t)}function v(e){return e.parentElement}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 p(e,t,n,r){function u(n){if(n.target instanceof Element)for(var u=n.target;u;){if(d(u,t))return n.delegateTarget=e,r(n),void delete n.delegateTarget;if(u===e)return;u=v(u)}}var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return m(e,n,u,o)}function y(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)?e[t]:n}function g(e){return Array.prototype.slice.call(e)}function h(e,t,n,r){return new CustomEvent(e,{bubbles:n,cancelable:r,detail:t})}function b(e,t,n,r){var u=document.createEvent("CustomEvent");return u.initCustomEvent(e,n,r,t),u}function C(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=y(r,"bubbles",!0),o=y(r,"cancelable",!0),c=D(t,n,u,o);return e.dispatchEvent(c)}function E(e,t,n){function r(o){e.removeEventListener(t,r,u),n(o)}var u=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return m(e,t,r,u)}function w(e){var t=v(e);return!!t&&(t.removeChild(e),!0)}function L(e,t){e.innerHTML=t}function x(e,t){e.textContent=t}function M(e,t){return e.querySelector(t)}function S(e,t){return g(e.querySelectorAll(t))}function A(e,t){for(var n="string"==typeof t?function(e){return d(e,t)}:t,r=v(e);r;){if(n(r))return r;r=v(r)}return null}function T(e,t){return d(e,t)?e:A(e,t)}function j(e,t){return e.closest(t)}function q(e,t){return"string"==typeof t?F(e,t):t(e)?e:A(e,t)}function H(e){return e.innerHTML}function O(e){return e.textContent}function k(e){for(var t=[],n=v(e);n;)t.push(n),n=v(n);return t}function B(e,t){var n="string"==typeof t?function(e){return d(e,t)}:t;return k(e).filter(n)}var P=window.document.body,_=window.document.documentElement,z=function(){return document.createElement("div").dataset?s:f}(),U=function(){var e=document.createElement("div");return e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector}(),D="function"==typeof window.CustomEvent?h:b,F=function(){return document.createElement("div").closest?j:T}();e.body=P,e.html=_,e.addClass=n,e.addClasses=r,e.hasClass=t,e.removeClass=u,e.removeClasses=o,e.toggleClass=c,e.toggleClasses=a,e.dataset=l,e.delegate=p,e.dispatch=C,e.on=m,e.once=E,e.remove=w,e.setHtml=L,e.setText=x,e.query=M,e.queryAll=S,e.closest=q,e.getHtml=H,e.getText=O,e.matches=d,e.parent=v,e.parentBy=A,e.parents=k,e.parentsBy=B,Object.defineProperty(e,"__esModule",{value:!0})});
/*! homey v0.1.0-beta.7 | 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=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){for(var t=arguments.length,r=Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];return r.reduce(function(t,r){return n(e,r)||t},!1)}function o(e,n){var r=t(e,n);return r&&e.classList.remove(n),r}function u(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.reduce(function(t,n){return o(e,n)||t},!1)}function c(e,r,u){return((3===arguments.length?u:!t(e,r))?n:o)(e,r)}function i(e,t){return Object.keys(t).reduce(function(n,r){var o=t[r];return c(e,r,o)||n},!1)}function a(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.reduce(function(t,n){return("string"==typeof n?c(e,n):i(e,n))||t},!1)}function f(e){return e.dataset}function s(e){return[].slice.call(e.attributes).reduce(function(e,t){var n=t.name,r=t.value;return/^data-(.+)/.test(n)&&(e[n.substr(5).replace(/-\w/g,function(e){return e[1].toUpperCase()})]=r),e},{})}function l(e){return K(e)}function d(e,t){return Q.call(e,t)}function v(e){return e.parentElement}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 p(e,t,n,r){function o(n){if(n.target instanceof Element)for(var o=n.target;o;){if(d(o,t))return n.delegateTarget=e,r(n),void delete n.delegateTarget;if(o===e)return;o=v(o)}}var u=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return m(e,n,o,u)}function h(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)?e[t]:n}function g(e){return Array.prototype.slice.call(e)}function y(e,t,n,r){return new CustomEvent(e,{bubbles:n,cancelable:r,detail:t})}function b(e,t,n,r){var o=document.createEvent("CustomEvent");return o.initCustomEvent(e,n,r,t),o}function E(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},o=h(r,"bubbles",!0),u=h(r,"cancelable",!0),c=R(t,n,o,u);return e.dispatchEvent(c)}function C(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)}function w(e,t){e.insertAdjacentHTML("beforeend",t)}function A(e,t){e.appendChild(t)}function L(e,t){g(t).forEach(function(t){A(e,t)})}function M(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];n.forEach(function(t){"string"==typeof t?w(e,t):t instanceof Node?A(e,t):L(e,t)}),e.normalize()}function T(e,t){e.insertAdjacentHTML("afterbegin",t)}function x(e,t){e.insertBefore(t,e.firstChild)}function S(e,t){g(t).reverse().forEach(function(t){x(e,t)})}function j(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];n.reverse().forEach(function(t){"string"==typeof t?T(e,t):t instanceof Node?x(e,t):S(e,t)}),e.normalize()}function H(e){var t=v(e);return!!t&&(t.removeChild(e),!0)}function q(e,t){e.innerHTML=t}function O(e,t){e.textContent=t}function z(e,t){return e.querySelector(t)}function B(e,t){return g(e.querySelectorAll(t))}function k(e,t){for(var n="string"==typeof t?function(e){return d(e,t)}:t,r=v(e);r;){if(n(r))return r;r=v(r)}return null}function N(e,t){return d(e,t)?e:k(e,t)}function P(e,t){return e.closest(t)}function _(e,t){return"string"==typeof t?V(e,t):t(e)?e:k(e,t)}function U(e){return e.innerHTML}function D(e){return e.textContent}function F(e){for(var t=[],n=v(e);n;)t.push(n),n=v(n);return t}function G(e,t){var n="string"==typeof t?function(e){return d(e,t)}:t;return F(e).filter(n)}var I=window.document.body,J=window.document.documentElement,K=function(){return document.createElement("div").dataset?f:s}(),Q=function(){var e=document.createElement("div");return e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector}(),R="function"==typeof window.CustomEvent?y:b,V=function(){return document.createElement("div").closest?P:N}();e.body=I,e.html=J,e.addClass=n,e.addClasses=r,e.hasClass=t,e.removeClass=o,e.removeClasses=u,e.toggleClass=c,e.toggleClasses=a,e.dataset=l,e.delegate=p,e.dispatch=E,e.on=m,e.once=C,e.append=M,e.prepend=j,e.remove=H,e.setHtml=q,e.setText=O,e.query=z,e.queryAll=B,e.closest=_,e.getHtml=U,e.getText=D,e.matches=d,e.parent=v,e.parentBy=k,e.parents=F,e.parentsBy=G,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=homey.min.js.map
/*!
* homey v0.1.0-beta.6
* homey v0.1.0-beta.7
* https://github.com/demiazz/homey

@@ -4,0 +4,0 @@ *

/*!
* homey v0.1.0-beta.6
* homey v0.1.0-beta.7
* https://github.com/demiazz/homey

@@ -4,0 +4,0 @@ *

/*!
* homey v0.1.0-beta.6
* homey v0.1.0-beta.7
* https://github.com/demiazz/homey

@@ -4,0 +4,0 @@ *

/*!
* homey v0.1.0-beta.6
* homey v0.1.0-beta.7
* https://github.com/demiazz/homey

@@ -4,0 +4,0 @@ *

/*!
* homey v0.1.0-beta.6
* homey v0.1.0-beta.7
* https://github.com/demiazz/homey

@@ -4,0 +4,0 @@ *

/*!
* homey v0.1.0-beta.6
* homey v0.1.0-beta.7
* https://github.com/demiazz/homey

@@ -4,0 +4,0 @@ *

/*!
* homey v0.1.0-beta.6
* homey v0.1.0-beta.7
* https://github.com/demiazz/homey

@@ -4,0 +4,0 @@ *

/*!
* homey v0.1.0-beta.6
* homey v0.1.0-beta.7
* https://github.com/demiazz/homey

@@ -4,0 +4,0 @@ *

/*!
* homey v0.1.0-beta.6
* homey v0.1.0-beta.7
* https://github.com/demiazz/homey

@@ -4,0 +4,0 @@ *

/*!
* homey v0.1.0-beta.6
* homey v0.1.0-beta.7
* https://github.com/demiazz/homey

@@ -4,0 +4,0 @@ *

/*!
* homey v0.1.0-beta.6
* homey v0.1.0-beta.7
* https://github.com/demiazz/homey

@@ -4,0 +4,0 @@ *

/*!
* homey v0.1.0-beta.6
* homey v0.1.0-beta.7
* https://github.com/demiazz/homey

@@ -4,0 +4,0 @@ *

/*!
* homey v0.1.0-beta.6
* homey v0.1.0-beta.7
* https://github.com/demiazz/homey

@@ -4,0 +4,0 @@ *

/*!
* homey v0.1.0-beta.6
* homey v0.1.0-beta.7
* https://github.com/demiazz/homey

@@ -4,0 +4,0 @@ *

/*!
* homey v0.1.0-beta.6
* homey v0.1.0-beta.7
* https://github.com/demiazz/homey

@@ -4,0 +4,0 @@ *

/*!
* homey v0.1.0-beta.6
* homey v0.1.0-beta.7
* https://github.com/demiazz/homey

@@ -4,0 +4,0 @@ *

/*!
* homey v0.1.0-beta.6
* homey v0.1.0-beta.7
* https://github.com/demiazz/homey

@@ -4,0 +4,0 @@ *

/*!
* homey v0.1.0-beta.6
* homey v0.1.0-beta.7
* https://github.com/demiazz/homey

@@ -14,3 +14,3 @@ *

});
exports.parentsBy = exports.parents = exports.parentBy = exports.parent = exports.matches = exports.getText = exports.getHtml = exports.closest = exports.queryAll = exports.query = exports.setText = exports.setHtml = exports.remove = exports.once = exports.on = exports.dispatch = exports.delegate = exports.dataset = exports.toggleClasses = exports.toggleClass = exports.removeClasses = exports.removeClass = exports.hasClass = exports.addClasses = exports.addClass = exports.html = exports.body = undefined;
exports.parentsBy = exports.parents = exports.parentBy = exports.parent = exports.matches = exports.getText = exports.getHtml = exports.closest = exports.queryAll = exports.query = exports.setText = exports.setHtml = exports.remove = exports.prepend = exports.append = exports.once = exports.on = exports.dispatch = exports.delegate = exports.dataset = exports.toggleClasses = exports.toggleClass = exports.removeClasses = exports.removeClass = exports.hasClass = exports.addClasses = exports.addClass = exports.html = exports.body = undefined;

@@ -73,2 +73,10 @@ var _body = require("./aliases/body");

var _append = require("./manipulation/append");
var _append2 = _interopRequireDefault(_append);
var _prepend = require("./manipulation/prepend");
var _prepend2 = _interopRequireDefault(_prepend);
var _remove = require("./manipulation/remove");

@@ -144,2 +152,4 @@

exports.once = _once2.default;
exports.append = _append2.default;
exports.prepend = _prepend2.default;
exports.remove = _remove2.default;

@@ -146,0 +156,0 @@ exports.setHtml = _setHtml2.default;

/*!
* homey v0.1.0-beta.6
* homey v0.1.0-beta.7
* https://github.com/demiazz/homey

@@ -4,0 +4,0 @@ *

/*!
* homey v0.1.0-beta.6
* homey v0.1.0-beta.7
* https://github.com/demiazz/homey

@@ -4,0 +4,0 @@ *

/*!
* homey v0.1.0-beta.6
* homey v0.1.0-beta.7
* https://github.com/demiazz/homey

@@ -4,0 +4,0 @@ *

/*!
* homey v0.1.0-beta.6
* homey v0.1.0-beta.7
* https://github.com/demiazz/homey

@@ -4,0 +4,0 @@ *

/*!
* homey v0.1.0-beta.6
* homey v0.1.0-beta.7
* https://github.com/demiazz/homey

@@ -4,0 +4,0 @@ *

/*!
* homey v0.1.0-beta.6
* homey v0.1.0-beta.7
* https://github.com/demiazz/homey

@@ -4,0 +4,0 @@ *

/*!
* homey v0.1.0-beta.6
* homey v0.1.0-beta.7
* https://github.com/demiazz/homey

@@ -4,0 +4,0 @@ *

/*!
* homey v0.1.0-beta.6
* homey v0.1.0-beta.7
* https://github.com/demiazz/homey

@@ -4,0 +4,0 @@ *

/*!
* homey v0.1.0-beta.6
* homey v0.1.0-beta.7
* https://github.com/demiazz/homey

@@ -4,0 +4,0 @@ *

/*!
* homey v0.1.0-beta.6
* homey v0.1.0-beta.7
* https://github.com/demiazz/homey

@@ -4,0 +4,0 @@ *

/*!
* homey v0.1.0-beta.6
* homey v0.1.0-beta.7
* https://github.com/demiazz/homey

@@ -4,0 +4,0 @@ *

/*!
* homey v0.1.0-beta.6
* homey v0.1.0-beta.7
* https://github.com/demiazz/homey

@@ -4,0 +4,0 @@ *

/*!
* homey v0.1.0-beta.6
* homey v0.1.0-beta.7
* https://github.com/demiazz/homey

@@ -4,0 +4,0 @@ *

/*!
* homey v0.1.0-beta.6
* homey v0.1.0-beta.7
* https://github.com/demiazz/homey

@@ -4,0 +4,0 @@ *

/*!
* homey v0.1.0-beta.6
* homey v0.1.0-beta.7
* https://github.com/demiazz/homey

@@ -4,0 +4,0 @@ *

{
"name": "homey",
"version": "0.1.0-beta.6",
"version": "0.1.0-beta.7",
"description": "Homey shortcut's collection for DOM API",

@@ -5,0 +5,0 @@ "license": "MIT",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc