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

eqcol

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eqcol - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

32

dist/eqcol.js

@@ -14,3 +14,3 @@ (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.Eqcol = 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){

module.exports = useNative() ? window.CustomEvent : function (event, params) {
const e = document.createEvent('CustomEvent');
var e = document.createEvent('CustomEvent');

@@ -90,5 +90,21 @@ params = params || {

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}return target;
};
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _createClass = function () {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);
}
}return function (Constructor, protoProps, staticProps) {
if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor;
};
}();

@@ -101,5 +117,11 @@ require('element-dataset');

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}

@@ -106,0 +128,0 @@ var NAME = 'eqcol';

2

dist/eqcol.min.js

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

(function(e){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=e()}else if(typeof define==="function"&&define.amd){define([],e)}else{var t;if(typeof window!=="undefined"){t=window}else if(typeof global!=="undefined"){t=global}else if(typeof self!=="undefined"){t=self}else{t=this}t.Eqcol=e()}})(function(){var e,t,n;return function e(t,n,r){function i(a,u){if(!n[a]){if(!t[a]){var f=typeof require=="function"&&require;if(!u&&f)return f(a,!0);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var s=n[a]={exports:{}};t[a][0].call(s.exports,function(e){var n=t[a][1][e];return i(n?n:e)},s,s.exports,e,t,n,r)}return n[a].exports}var o=typeof require=="function"&&require;for(var a=0;a<r.length;a++)i(r[a]);return i}({1:[function(e,t,n){"use strict";function r(){if(typeof window.CustomEvent==="function"){return true}return false}t.exports=r()?window.CustomEvent:function(e,t){const n=document.createEvent("CustomEvent");t=t||{bubbles:false,cancelable:false,detail:undefined};n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail);return n}},{}],2:[function(e,t,n){"use strict";function r(){if(!document.documentElement.dataset&&(!Object.getOwnPropertyDescriptor(Element.prototype,"dataset")||!Object.getOwnPropertyDescriptor(Element.prototype,"dataset").get)){var e={};e.enumerable=true;e.get=function(){var e=this;var t={};var n=this.attributes;function r(e){return e.charAt(1).toUpperCase()}function i(){return this.value}function o(e,t){if(typeof t!=="undefined"){this.setAttribute(e,t)}else{this.removeAttribute(e)}}for(var a=0;a<n.length;a++){var u=n[a];if(u&&u.name&&/^data-\w[\w\-]*$/.test(u.name)){var f=u.name;var l=u.value;var s=f.substr(5).replace(/-./g,r);Object.defineProperty(t,s,{enumerable:this.enumerable,get:i.bind({value:l||""}),set:o.bind(e,f)})}}return t};Object.defineProperty(Element.prototype,"dataset",e)}}t.exports=r},{}],3:[function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n){if(Object.prototype.hasOwnProperty.call(n,r)){e[r]=n[r]}}}return e};var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||false;r.configurable=true;if("value"in r)r.writable=true;Object.defineProperty(e,r.key,r)}}return function(t,n,r){if(n)e(t.prototype,n);if(r)e(t,r);return t}}();e("element-dataset");var o=e("customevent");var a=u(o);function u(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}var l="eqcol";var s={useTallest:true,minHeight:0,byRow:true,groupAttr:"data-"+l,watchAttr:"data-"+l+"-watch"};var c={before:"equal",after:"equaled"};var p=Array.prototype.slice;var v=function(){function e(t,n){var i=this;f(this,e);if(typeof t==="string"){this._element=document.querySelector(t)}else if(t.nodeType){this._element=t}this._options=r({},s,this._element.dataset,n);setTimeout(function(){return i.equalize()},0)}i(e,[{key:"equalize",value:function e(){var t=this;var n=this._getItems();if(!n.length){return}var r=new a.default(c.before,{cancelable:true});this._element.dispatchEvent(r);if(r.defaultPrevented){return}var i=function e(){var r=p.call(n);var i=[];if(t._options.byRow){(function(){var e=t;var o=n[0].getBoundingClientRect().top;r=r.filter(function(t){if(e._getHeight(t)>0){if(t.getBoundingClientRect().top===o){return true}i.push(t)}return false})})()}if(r.length===1){var o=t._getHeight(r[0]);if(o<t._options.minHeight){r[0].style.height=t._options.minHeight+"px"}else{r[0].style.height="auto"}}else if(r.length>1){(function(){var e=r.map(t._getHeight);var n=t._options.useTallest?Math.max.apply(null,e):Math.min.apply(null,e);n=Math.max(t._options.minHeight,n);r.forEach(function(e){e.style.height=n+"px"})})()}n=i};while(n.length>0){i()}var o=new a.default(c.after,{cancelable:true});this._element.dispatchEvent(o)}},{key:"destroy",value:function e(){var t=this._getItems();p.call(t).forEach(function(e){e.style.height="auto"})}},{key:"_getItems",value:function e(){var t=this._element.getAttribute(""+this._options.groupAttr)||"";return this._element.querySelectorAll("["+this._options.watchAttr+'="'+t+'"]')}},{key:"_getHeight",value:function e(t){return t.offsetHeight}}]);return e}();t.exports=v},{customevent:1,"element-dataset":2}]},{},[3])(3)});
(function(e){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=e()}else if(typeof define==="function"&&define.amd){define([],e)}else{var t;if(typeof window!=="undefined"){t=window}else if(typeof global!=="undefined"){t=global}else if(typeof self!=="undefined"){t=self}else{t=this}t.Eqcol=e()}})(function(){var e,t,n;return function e(t,n,r){function i(a,u){if(!n[a]){if(!t[a]){var f=typeof require=="function"&&require;if(!u&&f)return f(a,!0);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var s=n[a]={exports:{}};t[a][0].call(s.exports,function(e){var n=t[a][1][e];return i(n?n:e)},s,s.exports,e,t,n,r)}return n[a].exports}var o=typeof require=="function"&&require;for(var a=0;a<r.length;a++)i(r[a]);return i}({1:[function(e,t,n){"use strict";function r(){if(typeof window.CustomEvent==="function"){return true}return false}t.exports=r()?window.CustomEvent:function(e,t){var n=document.createEvent("CustomEvent");t=t||{bubbles:false,cancelable:false,detail:undefined};n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail);return n}},{}],2:[function(e,t,n){"use strict";function r(){if(!document.documentElement.dataset&&(!Object.getOwnPropertyDescriptor(Element.prototype,"dataset")||!Object.getOwnPropertyDescriptor(Element.prototype,"dataset").get)){var e={};e.enumerable=true;e.get=function(){var e=this;var t={};var n=this.attributes;function r(e){return e.charAt(1).toUpperCase()}function i(){return this.value}function o(e,t){if(typeof t!=="undefined"){this.setAttribute(e,t)}else{this.removeAttribute(e)}}for(var a=0;a<n.length;a++){var u=n[a];if(u&&u.name&&/^data-\w[\w\-]*$/.test(u.name)){var f=u.name;var l=u.value;var s=f.substr(5).replace(/-./g,r);Object.defineProperty(t,s,{enumerable:this.enumerable,get:i.bind({value:l||""}),set:o.bind(e,f)})}}return t};Object.defineProperty(Element.prototype,"dataset",e)}}t.exports=r},{}],3:[function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n){if(Object.prototype.hasOwnProperty.call(n,r)){e[r]=n[r]}}}return e};var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||false;r.configurable=true;if("value"in r)r.writable=true;Object.defineProperty(e,r.key,r)}}return function(t,n,r){if(n)e(t.prototype,n);if(r)e(t,r);return t}}();e("element-dataset");var o=e("customevent");var a=u(o);function u(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}var l="eqcol";var s={useTallest:true,minHeight:0,byRow:true,groupAttr:"data-"+l,watchAttr:"data-"+l+"-watch"};var c={before:"equal",after:"equaled"};var p=Array.prototype.slice;var v=function(){function e(t,n){var i=this;f(this,e);if(typeof t==="string"){this._element=document.querySelector(t)}else if(t.nodeType){this._element=t}this._options=r({},s,this._element.dataset,n);setTimeout(function(){return i.equalize()},0)}i(e,[{key:"equalize",value:function e(){var t=this;var n=this._getItems();if(!n.length){return}var r=new a.default(c.before,{cancelable:true});this._element.dispatchEvent(r);if(r.defaultPrevented){return}var i=function e(){var r=p.call(n);var i=[];if(t._options.byRow){(function(){var e=t;var o=n[0].getBoundingClientRect().top;r=r.filter(function(t){if(e._getHeight(t)>0){if(t.getBoundingClientRect().top===o){return true}i.push(t)}return false})})()}if(r.length===1){var o=t._getHeight(r[0]);if(o<t._options.minHeight){r[0].style.height=t._options.minHeight+"px"}else{r[0].style.height="auto"}}else if(r.length>1){(function(){var e=r.map(t._getHeight);var n=t._options.useTallest?Math.max.apply(null,e):Math.min.apply(null,e);n=Math.max(t._options.minHeight,n);r.forEach(function(e){e.style.height=n+"px"})})()}n=i};while(n.length>0){i()}var o=new a.default(c.after,{cancelable:true});this._element.dispatchEvent(o)}},{key:"destroy",value:function e(){var t=this._getItems();p.call(t).forEach(function(e){e.style.height="auto"})}},{key:"_getItems",value:function e(){var t=this._element.getAttribute(""+this._options.groupAttr)||"";return this._element.querySelectorAll("["+this._options.watchAttr+'="'+t+'"]')}},{key:"_getHeight",value:function e(t){return t.offsetHeight}}]);return e}();t.exports=v},{customevent:1,"element-dataset":2}]},{},[3])(3)});
{
"name": "eqcol",
"version": "1.0.0",
"version": "1.1.0",
"description": "Equal effing columns",

@@ -11,3 +11,3 @@ "license": "MIT",

},
"main": "index.js",
"main": "src/eqcol.js",
"keywords": [

@@ -23,10 +23,10 @@ "equal",

"scripts": {
"build": "npm test && npm run bundle && npm run minify",
"bundle": "node_modules/.bin/browserify src/eqcol.js -o dist/eqcol.js -t [babelify] -s Eqcol",
"min": "node_modules/.bin/uglifyjs dist/eqcol.js -o dist/eqcol.min.js -m",
"build": "npm test && npm run bundle && npm run min",
"minify": "node_modules/.bin/uglifyjs dist/eqcol.js -o dist/eqcol.min.js -m",
"test": "xo"
},
"dependencies": {
"element-dataset": "^1.3.0",
"customevent": "^0.1.1"
"customevent": "^1.0.0",
"element-dataset": "^1.3.0"
},

@@ -50,2 +50,7 @@ "devDependencies": {

},
"browserify": {
"transform": [
"babelify"
]
},
"xo": {

@@ -52,0 +57,0 @@ "esnext": true,

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