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

storm-equal-height

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

storm-equal-height - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

15

dist/storm-equal-height.js
/**
* @name storm-equal-height:
* @version 0.1.0: Wed, 10 Feb 2016 11:51:00 GMT
* @name storm-equal-height: Layout helper to equalise the height of a set of DOM elements
* @version 0.1.0: Tue, 16 Feb 2016 20:19:41 GMT
* @author stormid

@@ -17,3 +17,3 @@ * @license MIT

var instance,
var instances = [],
defaults = {

@@ -57,6 +57,7 @@ minWidth: 768

}
els.forEach(function(el){
instances.push(new StormEqualHeight([].slice.call(el.children), opts));
});
instance = new StormEqualHeight(els, opts);
return instance;
return instances;
}

@@ -70,3 +71,3 @@

function destroy() {
instance = null;
instances = null;
}

@@ -73,0 +74,0 @@

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

!function(e,t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():e.StormEqualHeight=t()}(this,function(){"use strict";function e(e,t){this.settings=r({},s,t),this.DOMElements=e,global.setTimeout(this.equalise.bind(this),0),global.addEventListener("resize",this.equalise.bind(this),!1)}function t(t,i){var n=[].slice.call(document.querySelectorAll(t));if(0===n.length)throw new Error("Equal Height cannot be initialised, no augmentable elements found");return o=new e(n,i)}function i(e,i){n(),t(e,i)}function n(){o=null}var o,s={minWidth:768},r=require("merge");require("lodash.throttle");return e.prototype.equalise=function(){var e=0;this.DOMElements.forEach(function(t){t.style.height="auto",t.offsetHeight>e&&(e=t.offsetHeight)}),window.innerWidth<this.settings.minWidth||this.DOMElements.forEach(function(t){t.style.height=e+"px"})},{init:t,reload:i,destroy:n}});
!function(e,t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():e.StormEqualHeight=t()}(this,function(){"use strict";function e(e,t){this.settings=l({},s,t),this.DOMElements=e,global.setTimeout(this.equalise.bind(this),0),global.addEventListener("resize",this.equalise.bind(this),!1)}function t(t,i){var n=[].slice.call(document.querySelectorAll(t));if(0===n.length)throw new Error("Equal Height cannot be initialised, no augmentable elements found");return n.forEach(function(t){o.push(new e([].slice.call(t.children),i))}),o}function i(e,i){n(),t(e,i)}function n(){o=null}var o=[],s={minWidth:768},l=require("merge");require("lodash.throttle");return e.prototype.equalise=function(){var e=0;this.DOMElements.forEach(function(t){t.style.height="auto",t.offsetHeight>e&&(e=t.offsetHeight)}),window.innerWidth<this.settings.minWidth||this.DOMElements.forEach(function(t){t.style.height=e+"px"})},{init:t,reload:i,destroy:n}});
/**
* @name storm-equal-height:
* @version 0.1.0: Wed, 10 Feb 2016 11:51:00 GMT
* @name storm-equal-height: Layout helper to equalise the height of a set of DOM elements
* @version 0.1.0: Tue, 16 Feb 2016 20:19:41 GMT
* @author stormid

@@ -17,3 +17,3 @@ * @license MIT

var instance,
var instances = [],
defaults = {

@@ -57,6 +57,7 @@ minWidth: 768

}
els.forEach(function(el){
instances.push(new StormEqualHeight([].slice.call(el.children), opts));
});
instance = new StormEqualHeight(els, opts);
return instance;
return instances;
}

@@ -70,3 +71,3 @@

function destroy() {
instance = null;
instances = null;
}

@@ -73,0 +74,0 @@

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

!function(e,t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():e.StormEqualHeight=t()}(this,function(){"use strict";function e(e,t){this.settings=r({},s,t),this.DOMElements=e,global.setTimeout(this.equalise.bind(this),0),global.addEventListener("resize",this.equalise.bind(this),!1)}function t(t,i){var n=[].slice.call(document.querySelectorAll(t));if(0===n.length)throw new Error("Equal Height cannot be initialised, no augmentable elements found");return o=new e(n,i)}function i(e,i){n(),t(e,i)}function n(){o=null}var o,s={minWidth:768},r=require("merge");require("lodash.throttle");return e.prototype.equalise=function(){var e=0;this.DOMElements.forEach(function(t){t.style.height="auto",t.offsetHeight>e&&(e=t.offsetHeight)}),window.innerWidth<s.minWidth||this.DOMElements.forEach(function(t){t.style.height=e+"px"})},{init:t,reload:i,destroy:n}});
!function(e,t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():e.StormEqualHeight=t()}(this,function(){"use strict";function e(e,t){this.settings=l({},s,t),this.DOMElements=e,global.setTimeout(this.equalise.bind(this),0),global.addEventListener("resize",this.equalise.bind(this),!1)}function t(t,i){var n=[].slice.call(document.querySelectorAll(t));if(0===n.length)throw new Error("Equal Height cannot be initialised, no augmentable elements found");return n.forEach(function(t){o.push(new e([].slice.call(t.children),i))}),o}function i(e,i){n(),t(e,i)}function n(){o=null}var o,s={minWidth:768},l=require("merge");require("lodash.throttle");return e.prototype.equalise=function(){var e=0;this.DOMElements.forEach(function(t){t.style.height="auto",t.offsetHeight>e&&(e=t.offsetHeight)}),window.innerWidth<this.settings.minWidth||this.DOMElements.forEach(function(t){t.style.height=e+"px"})},{init:t,reload:i,destroy:n}});
{
"name": "storm-equal-height",
"version": "0.1.0",
"version": "0.2.0",
"description": "Layout helper to equalise the height of a set of DOM elements",

@@ -5,0 +5,0 @@ "author": "stormid",

@@ -8,7 +8,9 @@ #Storm Equal Height

```javascript
var equalHeight = require('storm-equal-height')
equalHeight.init('js-equal-height', {minWidth: 768});
```
The selector class refers to the parent node, and equalises te height of all children.
###Options
minWidth, Number, minimum window width at which to apply equal height across elements

@@ -12,3 +12,3 @@ (function(root, factory) {

var instance,
var instances = [],
defaults = {

@@ -52,6 +52,7 @@ minWidth: 768

}
els.forEach(function(el){
instances.push(new StormEqualHeight([].slice.call(el.children), opts));
});
instance = new StormEqualHeight(els, opts);
return instance;
return instances;
}

@@ -65,3 +66,3 @@

function destroy() {
instance = null;
instances = null;
}

@@ -68,0 +69,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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