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

@opensea/seadn

Package Overview
Dependencies
Maintainers
10
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opensea/seadn - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

2

package.json
{
"name": "@opensea/seadn",
"version": "2.0.0",
"version": "2.0.1",
"description": "Javascript SDK to work with SeaDN",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -61,2 +61,12 @@ import { test, expect } from "vitest";

[
"https://i2.seadn.io/bored-ape",
{
height: 100,
width: 100,
format: "avif",
quality: 50,
} satisfies MediaParams,
"https://i2.seadn.io/bored-ape?h=100&w=100&format=avif&q=50",
],
[
"https://xyz.com/bored-ape.png",

@@ -63,0 +73,0 @@ { height: 100, width: 100, format: "avif" } satisfies MediaParams,

@@ -7,2 +7,3 @@ export type MediaFormat = "webp" | "avif" | "jpeg" | "png";

format?: MediaFormat;
quality?: number;
};

@@ -12,3 +13,3 @@

image: string | URL,
{ width, height, format }: MediaParams,
{ width, height, format, quality }: MediaParams,
): string {

@@ -41,2 +42,9 @@ try {

}
if (quality) {
if (quality <= 0 || quality > 100) {
throw new Error("Quality has to be a positive number between 1 and 100");
}
params.set("q", String(quality));
}
image.search = params.toString();

@@ -43,0 +51,0 @@ return image.toString();

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