Socket
Socket
Sign inDemoInstall

@deckdeckgo/utils

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@deckdeckgo/utils - npm Package Compare versions

Comparing version 1.6.0 to 1.7.0

8

CHANGELOG.md

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

<a name="1.7.0"></a>
# 1.7.0 (2020-11-21)
### Features
- isLandscape and isPortrait
<a name="1.6.0"></a>

@@ -2,0 +10,0 @@

@@ -61,2 +61,11 @@ 'use strict';

}
function isLandscape() {
return !isPortrait();
}
function isPortrait() {
if (!window) {
return false;
}
return window.matchMedia && window.matchMedia('(orientation: portrait)').matches;
}

@@ -181,3 +190,5 @@ function lazyLoadSelectedImages(images) {

exports.isIPad = isIPad;
exports.isLandscape = isLandscape;
exports.isMobile = isMobile;
exports.isPortrait = isPortrait;
exports.isRTL = isRTL;

@@ -184,0 +195,0 @@ exports.lazyLoadSelectedImages = lazyLoadSelectedImages;

2

lib/utils/utils.d.ts

@@ -9,1 +9,3 @@ export declare function unifyEvent(e: any): any;

export declare function isRTL(): boolean;
export declare function isLandscape(): boolean;
export declare function isPortrait(): boolean;

@@ -57,1 +57,10 @@ export function unifyEvent(e) {

}
export function isLandscape() {
return !isPortrait();
}
export function isPortrait() {
if (!window) {
return false;
}
return window.matchMedia && window.matchMedia('(orientation: portrait)').matches;
}

2

package.json
{
"name": "@deckdeckgo/utils",
"version": "1.6.0",
"version": "1.7.0",
"author": "David Dal Busco",

@@ -5,0 +5,0 @@ "description": "A collection of utils methods and functions developed for DeckDeckGo",

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