@iconify/utils
Advanced tools
Comparing version 1.0.11 to 1.0.12
@@ -17,2 +17,3 @@ import type { IconifyInfo } from '@iconify/types'; | ||
displayHeight?: number; | ||
samplesHeight?: number; | ||
category?: string; | ||
@@ -19,0 +20,0 @@ palette?: 'Colorless' | 'Colorful'; |
@@ -114,12 +114,14 @@ "use strict"; | ||
} | ||
if (typeof source.displayHeight === 'number' || | ||
typeof source.displayHeight === 'string') { | ||
// Convert from source.displayHeight | ||
const num = parseInt(source.displayHeight); | ||
if (num >= minDisplayHeight && | ||
num <= maxDisplayHeight && | ||
Math.round(num) === num) { | ||
result.displayHeight = num; | ||
['samplesHeight', 'displayHeight'].forEach((prop) => { | ||
const value = source[prop]; | ||
if (typeof value === 'number' || typeof value === 'string') { | ||
// Convert from source.displayHeight or source.samplesHeight | ||
const num = parseInt(value); | ||
if (num >= minDisplayHeight && | ||
num <= maxDisplayHeight && | ||
Math.round(num) === num) { | ||
result.displayHeight = num; | ||
} | ||
} | ||
} | ||
}); | ||
// Convert palette from string value | ||
@@ -126,0 +128,0 @@ if (typeof source.palette === 'string') { |
@@ -5,3 +5,3 @@ { | ||
"author": "Vjacheslav Trushkin", | ||
"version": "1.0.11", | ||
"version": "1.0.12", | ||
"license": "MIT", | ||
@@ -8,0 +8,0 @@ "bugs": "https://github.com/iconify/iconify/issues", |
Sorry, the diff of this file is not supported yet
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
89290
61
2853