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

fast-average-color-node

Package Overview
Dependencies
Maintainers
0
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fast-average-color-node - npm Package Compare versions

Comparing version 3.0.0 to 3.1.0

1

dist/index.d.ts

@@ -1,3 +0,2 @@

/// <reference types="node" />
import { FastAverageColorOptions, FastAverageColorResult } from 'fast-average-color';
export declare function getAverageColor(resource: string | Buffer, options?: FastAverageColorOptions): Promise<FastAverageColorResult>;

6

dist/index.js

@@ -6,5 +6,4 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.getAverageColor = void 0;
exports.getAverageColor = getAverageColor;
const sharp_1 = __importDefault(require("sharp"));
const node_fetch_1 = __importDefault(require("node-fetch"));
const fast_average_color_1 = require("fast-average-color");

@@ -66,3 +65,3 @@ const fac = new fast_average_color_1.FastAverageColor();

else if (resource.search(/^https?:\/\//) !== -1) {
const response = await (0, node_fetch_1.default)(resource);
const response = await fetch(resource);
const arrayBuffer = await response.arrayBuffer();

@@ -92,2 +91,1 @@ input = Buffer.from(arrayBuffer);

}
exports.getAverageColor = getAverageColor;
{
"name": "fast-average-color-node",
"version": "3.0.0",
"version": "3.1.0",
"description": "A simple library that calculates the average color of images in Node.js.",

@@ -14,11 +14,9 @@ "main": "dist/index.js",

"fast-average-color": "^9.4.0",
"node-fetch": "^2.6.7",
"sharp": "^0.33.2"
"sharp": "^0.33.5"
},
"devDependencies": {
"@types/jest": "^29.5.11",
"@types/node-fetch": "^2.6.2",
"@types/jest": "^29.5.13",
"jest": "^29.7.0",
"ts-jest": "^29.1.1",
"typescript": "^5.3.3"
"ts-jest": "^29.2.5",
"typescript": "^5.6.2"
},

@@ -25,0 +23,0 @@ "files": [

import sharp from 'sharp';
import fetch from 'node-fetch';
import { FastAverageColor, FastAverageColorOptions, FastAverageColorResult } from 'fast-average-color';

@@ -4,0 +3,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