Socket
Socket
Sign inDemoInstall

instant-meme

Package Overview
Dependencies
122
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.1 to 2.0.0

4

api/memebuilder.js

@@ -10,4 +10,4 @@ const { createCanvas, loadImage, registerFont } = require('canvas')

const fontFile = templateData.font || 'OpenSans-Regular.ttf';
registerFont(`fonts/${fontFile}`,{family: "daFont"});
const image = await loadImage(`templates/${templateData.template}`);
registerFont(`instant-meme/fonts/${fontFile}`,{family: "daFont"});
const image = await loadImage(`instant-meme/templates/${templateData.template}`);
const canvas = createCanvas(image.naturalWidth,image.naturalHeight, 'png');

@@ -14,0 +14,0 @@ const ctx = canvas.getContext('2d');

@@ -9,3 +9,3 @@ /**

const fileName = `${req.params.memeName}.json`;
const json = await fs.promises.readFile(`templates/${fileName}`, 'utf-8');
const json = await fs.promises.readFile(`instant-meme/templates/${fileName}`, 'utf-8');
let obj = JSON.parse(json);

@@ -12,0 +12,0 @@

{
"name": "instant-meme",
"version": "1.0.1",
"version": "2.0.0",
"description": "A express middleware to build 'memes' on the fly by specifying the image and text content in the url. Because photoshop is to slow for conversation.",

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc