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.2.1 to 0.2.2

5

dist/index.js

@@ -7,2 +7,3 @@ 'use strict';

var queryString = _interopDefault(require('query-string'));
var assign = _interopDefault(require('object-assign'));

@@ -24,3 +25,3 @@ function Image(_ref) {

// set default params, merge user preferences with priority
var opts = Object.assign({
var opts = assign({
fm: src.match(/\.(\w+)$/)[1],

@@ -57,3 +58,3 @@ fit: aspect_ratio ? 'crop' : 'max',

return steps.map(function (s) {
var opt = Object.assign({}, opts, { w: s }, overrides);
var opt = assign({}, opts, { w: s }, overrides);
if (aspect_ratio) opt.h = aspect_ratio[1] / aspect_ratio[0] * s;

@@ -60,0 +61,0 @@ return src + '?' + queryString.stringify(opt) + ' ' + s + 'w';

3

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.2.1",
"version": "0.2.2",
"main": "dist",
"peerDependencies": {
"object-assign": "^4.1.1",
"preact": "^8.2.6"

@@ -8,0 +9,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