fast-average-color-node
Advanced tools
Comparing version 3.0.0 to 3.1.0
@@ -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,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 @@ |
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
Network access
Supply chain riskThis module accesses the network.
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
2
4
10596
170
1
- Removednode-fetch@^2.6.7
- Removednode-fetch@2.7.0(transitive)
- Removedtr46@0.0.3(transitive)
- Removedwebidl-conversions@3.0.1(transitive)
- Removedwhatwg-url@5.0.0(transitive)
Updatedsharp@^0.33.5