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

ios-inner-height

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ios-inner-height - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

9

dist/ios-inner-height.js

@@ -15,2 +15,10 @@ (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.iosInnerHeight = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){

module.exports = (function () {
// Avoid errors when globals are undefined (CI, etc)
// https://github.com/tylerjpeterson/ios-inner-height/pull/7
if (typeof window === 'undefined' || typeof navigator === 'undefined') {
return function () {
return 0;
};
}
// Non-iOS browsers return window.innerHeight per usual.

@@ -70,2 +78,3 @@ // No caching here since browsers can be resized, and setting

}
return dims.w;

@@ -72,0 +81,0 @@ };

2

dist/ios-inner-height.min.js

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

!function(f){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=f();else if("function"==typeof define&&define.amd)define([],f);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).iosInnerHeight=f()}}(function(){return function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){return o(e[i][1][r]||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}({1:[function(require,module,exports){"use strict";module.exports=function(){if(!navigator.userAgent.match(/iphone|ipod|ipad/i))return function(){return window.innerHeight};var ruler,axis=Math.abs(window.orientation),dims={w:0,h:0};return(ruler=document.createElement("div")).style.position="fixed",ruler.style.height="100vh",ruler.style.width=0,ruler.style.top=0,document.documentElement.appendChild(ruler),dims.w=90===axis?ruler.offsetHeight:window.innerWidth,dims.h=90===axis?window.innerWidth:ruler.offsetHeight,document.documentElement.removeChild(ruler),ruler=null,function(){return 90!==Math.abs(window.orientation)?dims.h:dims.w}}()},{}]},{},[1])(1)});
!function(f){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=f();else if("function"==typeof define&&define.amd)define([],f);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).iosInnerHeight=f()}}(function(){return function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){return o(e[i][1][r]||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}({1:[function(require,module,exports){"use strict";module.exports=function(){if("undefined"==typeof window||"undefined"==typeof navigator)return function(){return 0};if(!navigator.userAgent.match(/iphone|ipod|ipad/i))return function(){return window.innerHeight};var ruler,axis=Math.abs(window.orientation),dims={w:0,h:0};return(ruler=document.createElement("div")).style.position="fixed",ruler.style.height="100vh",ruler.style.width=0,ruler.style.top=0,document.documentElement.appendChild(ruler),dims.w=90===axis?ruler.offsetHeight:window.innerWidth,dims.h=90===axis?window.innerWidth:ruler.offsetHeight,document.documentElement.removeChild(ruler),ruler=null,function(){return 90!==Math.abs(window.orientation)?dims.h:dims.w}}()},{}]},{},[1])(1)});

@@ -14,2 +14,10 @@ 'use strict';

module.exports = (function () {
// Avoid errors when globals are undefined (CI, etc)
// https://github.com/tylerjpeterson/ios-inner-height/pull/7
if (typeof window === 'undefined' || typeof navigator === 'undefined') {
return function () {
return 0;
};
}
// Non-iOS browsers return window.innerHeight per usual.

@@ -69,4 +77,5 @@ // No caching here since browsers can be resized, and setting

}
return dims.w;
};
})();
{
"name": "ios-inner-height",
"version": "1.1.0",
"version": "1.1.1",
"description": "Retrieve a consistent, accurate `window.innerHeight` measurement from iOS",

@@ -5,0 +5,0 @@ "author": "Tyler Peterson <tylerjpeterson@gmail.com>",

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