You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

spoondev

Package Overview
Dependencies
Maintainers
0
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

spoondev - npm Package Compare versions

Comparing version

to
1.3.0

src/Bienvenida.js

4

index.js

@@ -1,5 +0,5 @@

const { processImage } = require('./src/Image');
const { Img } = require('./src/Image');
module.exports = {
processImage,
Img,
};
{
"name": "spoondev",
"version": "1.2.2",
"version": "1.3.0",
"description": "Modulo npm para manipular imagenes",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -1,19 +0,10 @@

// my-fastapi-client.js
import { SpoonError } from "./utils/ZeewError";
import { Card } from "./cards";
const axios = require('axios');
async function processImage(token, params) {
try {
const response = await axios.post('https://spoonapi.vercel.app/process_image', params, {
headers: {
Authorization: `Bearer ${token}`, // Autenticación usando el token
},
});
return response.data.imageBase64; // Suponiendo que la imagen procesada es devuelta como base64
} catch (error) {
console.error('Error al procesar la imagen:', error);
throw new Error('Error al procesar la imagen');
export default class Img {
constructor(token) {
if (!token) throw new SpoonError("Debes colocar el token");
this.token = token;
this.card = new Card(token);
}
}
module.exports = { processImage };
}