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 2.0.1 to 2.1.0

commonHandlers.js

4

api/requestParser.js

@@ -5,6 +5,8 @@ /**

const {stripPNG} = require('../randomHelpers');
const fs = require('fs');
module.exports = async function (req) {
const fileName = `${req.params.memeName}.json`;
const memeName = stripPNG(req.params.memeName);
const fileName = `${memeName}.json`;
const json = await fs.promises.readFile(`instant-meme/templates/${fileName}`, 'utf-8');

@@ -11,0 +13,0 @@ let obj = JSON.parse(json);

@@ -6,10 +6,3 @@ const express = require('express');

const commonHandlers = {
e405: function(_req, res, _next) {
res.status(405).send('This Api only accepts GET requests.');
},
e404: function (_req, res, _next) {
res.status(404).send('File Not Found');
}
};
const commonHandlers = require('./commonHandlers');

@@ -16,0 +9,0 @@ async function memeHandler(req, res, _next) {

{
"name": "instant-meme",
"version": "2.0.1",
"version": "2.1.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.",

@@ -34,2 +34,4 @@ "main": "index.js",

"api/requestParser.js",
"randomHelpers.js",
"commonHandlers.js",
"README.md"

@@ -36,0 +38,0 @@ ],

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