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.1.0 to 0.1.1

5

index.d.ts

@@ -7,3 +7,4 @@ interface Config {

cloudinaryUrlBase?: string;
font?: string;
titleFont?: string;
taglineFont?: string;
imageWidth?: number;

@@ -25,3 +26,3 @@ imageHeight?: number;

*/
export default function generateSocialImage({ title, tagline, cloudName, imagePublicID, cloudinaryUrlBase, font, imageWidth, imageHeight, textAreaWidth, textLeftOffset, titleBottomOffset, taglineTopOffset, textColor, titleFontSize, taglineFontSize, version, }: Config): string;
export default function generateSocialImage({ title, tagline, cloudName, imagePublicID, cloudinaryUrlBase, titleFont, taglineFont, imageWidth, imageHeight, textAreaWidth, textLeftOffset, titleBottomOffset, taglineTopOffset, textColor, titleFontSize, taglineFontSize, version, }: Config): string;
export {};

6

index.js

@@ -9,3 +9,3 @@ "use strict";

function generateSocialImage(_a) {
var title = _a.title, tagline = _a.tagline, cloudName = _a.cloudName, imagePublicID = _a.imagePublicID, _b = _a.cloudinaryUrlBase, cloudinaryUrlBase = _b === void 0 ? 'https://res.cloudinary.com' : _b, _c = _a.font, font = _c === void 0 ? 'arial' : _c, _d = _a.imageWidth, imageWidth = _d === void 0 ? 1280 : _d, _e = _a.imageHeight, imageHeight = _e === void 0 ? 669 : _e, _f = _a.textAreaWidth, textAreaWidth = _f === void 0 ? 760 : _f, _g = _a.textLeftOffset, textLeftOffset = _g === void 0 ? 480 : _g, _h = _a.titleBottomOffset, titleBottomOffset = _h === void 0 ? 254 : _h, _j = _a.taglineTopOffset, taglineTopOffset = _j === void 0 ? 445 : _j, _k = _a.textColor, textColor = _k === void 0 ? '000000' : _k, _l = _a.titleFontSize, titleFontSize = _l === void 0 ? 64 : _l, _m = _a.taglineFontSize, taglineFontSize = _m === void 0 ? 48 : _m, _o = _a.version, version = _o === void 0 ? null : _o;
var title = _a.title, tagline = _a.tagline, cloudName = _a.cloudName, imagePublicID = _a.imagePublicID, _b = _a.cloudinaryUrlBase, cloudinaryUrlBase = _b === void 0 ? 'https://res.cloudinary.com' : _b, _c = _a.titleFont, titleFont = _c === void 0 ? 'arial' : _c, _d = _a.taglineFont, taglineFont = _d === void 0 ? 'arial' : _d, _e = _a.imageWidth, imageWidth = _e === void 0 ? 1280 : _e, _f = _a.imageHeight, imageHeight = _f === void 0 ? 669 : _f, _g = _a.textAreaWidth, textAreaWidth = _g === void 0 ? 760 : _g, _h = _a.textLeftOffset, textLeftOffset = _h === void 0 ? 480 : _h, _j = _a.titleBottomOffset, titleBottomOffset = _j === void 0 ? 254 : _j, _k = _a.taglineTopOffset, taglineTopOffset = _k === void 0 ? 445 : _k, _l = _a.textColor, textColor = _l === void 0 ? '000000' : _l, _m = _a.titleFontSize, titleFontSize = _m === void 0 ? 64 : _m, _o = _a.taglineFontSize, taglineFontSize = _o === void 0 ? 48 : _o, _p = _a.version, version = _p === void 0 ? null : _p;
// configure social media image dimensions, quality, and format

@@ -27,3 +27,3 @@ var imageConfig = [

"y_" + titleBottomOffset,
"l_text:" + font + "_" + titleFontSize + ":" + encodeURIComponent(title),
"l_text:" + titleFont + "_" + titleFontSize + ":" + encodeURIComponent(title),
].join(',');

@@ -38,3 +38,3 @@ // configure the tagline text

"y_" + taglineTopOffset,
"l_text:" + font + "_" + taglineFontSize + ":" + encodeURIComponent(tagline),
"l_text:" + taglineFont + "_" + taglineFontSize + ":" + encodeURIComponent(tagline),
].join(',');

@@ -41,0 +41,0 @@ // combine all the pieces required to generate a Cloudinary URL

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

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

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