@deckdeckgo/utils
Advanced tools
Comparing version 1.0.0 to 1.1.0
@@ -0,1 +1,9 @@ | ||
<a name="1.1.0"></a> | ||
# 1.1.0 (2020-04-17) | ||
### Features | ||
- add function `isRTL()` | ||
<a name="1.0.0"></a> | ||
@@ -2,0 +10,0 @@ |
@@ -53,2 +53,9 @@ 'use strict'; | ||
} | ||
function isRTL() { | ||
if (!document || !document.documentElement) { | ||
return false; | ||
} | ||
const htmlDir = document.documentElement.getAttribute('dir'); | ||
return htmlDir !== null && htmlDir === 'rtl'; | ||
} | ||
@@ -137,4 +144,5 @@ function lazyLoadSelectedImages(images) { | ||
exports.isMobile = isMobile; | ||
exports.isRTL = isRTL; | ||
exports.lazyLoadSelectedImages = lazyLoadSelectedImages; | ||
exports.lazyLoadSelectedLazyImagesComponent = lazyLoadSelectedLazyImagesComponent; | ||
exports.unifyEvent = unifyEvent; |
@@ -8,1 +8,2 @@ export declare function unifyEvent(e: any): any; | ||
export declare function isFirefox(): boolean; | ||
export declare function isRTL(): boolean; |
@@ -49,1 +49,8 @@ export function unifyEvent(e) { | ||
} | ||
export function isRTL() { | ||
if (!document || !document.documentElement) { | ||
return false; | ||
} | ||
const htmlDir = document.documentElement.getAttribute('dir'); | ||
return htmlDir !== null && htmlDir === 'rtl'; | ||
} |
{ | ||
"name": "@deckdeckgo/utils", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"author": "David Dal Busco", | ||
@@ -5,0 +5,0 @@ "description": "A collection of utils methods and functions developed for DeckDeckGo", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
17675
300
0