Socket
Socket
Sign inDemoInstall

@jlengstorf/get-share-image

Package Overview
Dependencies
0
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.3.0 to 0.4.0

2

index.d.ts
interface Config {
title: string;
tagline: string;
tagline?: string;
cloudName: string;

@@ -5,0 +5,0 @@ imagePublicID: string;

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

function cleanText(text) {
return encodeURIComponent(text).replace(/%(23|2C|2F|3F|5C)/g, "%25$1");
return encodeURIComponent(text).replace(/%(23|2C|2F|3F|5C)/g, '%25$1');
}
;
/**

@@ -40,11 +39,13 @@ * Generates a social sharing image with custom text using Cloudinary’s APIs.

// configure the tagline text
var taglineConfig = tagline ? [
"w_" + textAreaWidth,
'c_fit',
"co_rgb:" + textColor,
'g_north_west',
"x_" + textLeftOffset,
"y_" + taglineTopOffset,
"l_text:" + taglineFont + "_" + taglineFontSize + taglineExtraConfig + ":" + cleanText(tagline),
].join(',') : undefined;
var taglineConfig = tagline
? [
"w_" + textAreaWidth,
'c_fit',
"co_rgb:" + textColor,
'g_north_west',
"x_" + textLeftOffset,
"y_" + taglineTopOffset,
"l_text:" + taglineFont + "_" + taglineFontSize + taglineExtraConfig + ":" + cleanText(tagline),
].join(',')
: undefined;
// combine all the pieces required to generate a Cloudinary URL

@@ -51,0 +52,0 @@ var urlParts = [

{
"name": "@jlengstorf/get-share-image",
"version": "0.3.0",
"version": "0.4.0",
"main": "index.js",

@@ -5,0 +5,0 @@ "author": "Jason Lengstorf <jason@lengstorf.com> (https://lengstorf.com)",

@@ -55,3 +55,3 @@ # Generate Social Media Images Using Cloudinary

| title | true | (string) title text to be placed on the card |
| tagline | true | (string) tagline text to be placed on the card |
| tagline | | (string) tagline text to be placed on the card |
| cloudName | true | (string) your Cloudinary cloud name (i.e. your username) |

@@ -58,0 +58,0 @@ | imagePublicID | true | (string) the public ID of your social image template |

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