@hashicorp/hashi-image
Advanced tools
Comparing version 1.0.6 to 1.0.7
@@ -25,8 +25,11 @@ 'use strict'; | ||
// Parse the `fm` option for Imgix from the extension, if possible | ||
var formatMatch = src.match(/\.(\w+)$/); | ||
var hasExtension = !!formatMatch && !!formatMatch[1]; | ||
var formatOption = hasExtension ? { fm: formatMatch[1] } : {}; | ||
// set default params, merge user preferences with priority | ||
var opts = assign({ | ||
fm: src.match(/\.(\w+)$/)[1], | ||
fit: aspect_ratio ? 'crop' : 'max', | ||
q: 80 | ||
}, params); | ||
}, formatOption, params); | ||
@@ -76,3 +79,3 @@ // handle aspect ratios & steps passed as a string | ||
exports.default = Image; | ||
exports.format = format; | ||
exports.formatSteps = formatSteps; | ||
exports.format = format; |
{ | ||
"name": "@hashicorp/hashi-image", | ||
"description": "super optimized image element, pulls from dato and formats for 7 screen sizes in two formats. Skips optimization for SVGs.", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"author": "Hashicorp - Jeff Escalante", | ||
@@ -18,3 +18,3 @@ "main": "dist", | ||
}, | ||
"gitHead": "78236aa1b7f3adda5e4e3dd1d1ba8f084e1c24dc" | ||
"gitHead": "d9ec0292dda2108abce5d52001a190fee01c9497" | ||
} |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
4544
67
1