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

@hashicorp/hashi-image

Package Overview
Dependencies
Maintainers
3
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hashicorp/hashi-image - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

5

dist/index.js

@@ -30,2 +30,5 @@ 'use strict';

// handle aspect ratios passed as a string
aspect_ratio = typeof aspect_ratio === 'string' ? aspect_ratio.split(',').map(Number) : aspect_ratio;
if (svg && svg !== 'false') {

@@ -38,3 +41,3 @@ // if it's an SVG, we don't need the picture element, so return

var srcDefault = formatSteps(steps, opts, aspect_ratio, src);
var srcWebp = formatSteps(steps, assign(opts, { fm: 'webp' }), aspect_ratio, src);
var srcWebp = formatSteps(steps, assign({}, opts, { fm: 'webp' }), aspect_ratio, src);

@@ -41,0 +44,0 @@ return preact.h(

2

package.json
{
"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": "0.3.0",
"version": "0.3.1",
"main": "dist",

@@ -6,0 +6,0 @@ "peerDependencies": {

@@ -13,3 +13,3 @@ ### Image

* `alt` (str): [optional] alt text for the image [docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-alt)
* `aspect_ratio` (arr): [optional] automatically crops to aspect ratio. first two items in the array are the ratio (ex. `[16,9]`), and the third is the base width that images will be cropped to in IE, which doesn't support srcset (ex. `[16,9,500]`)
* `aspect_ratio` (arr or str): [optional] automatically crops to aspect ratio. first two items in the array are the ratio (ex. `[16,9]`), and the third is the base width that images will be cropped to in IE, which doesn't support srcset (ex. `[16,9,500]`). if string is provided, brackets should be excluded (ex. `16,9,500`). string will be converted to array
* `params` (obj): [optional] params passed directly to imgix

@@ -16,0 +16,0 @@

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