Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@giphy/js-util

Package Overview
Dependencies
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@giphy/js-util - npm Package Compare versions

Comparing version 3.1.0 to 3.1.1

3

dist/bestfit.js

@@ -24,6 +24,7 @@ "use strict";

var SCALE_UP_MAX_PIXELS = 50;
exports.setRenditionScaleUpMaxPixels = function (pixels) {
var setRenditionScaleUpMaxPixels = function (pixels) {
log_1.Logger.debug("@giphy/js-util set rendition selection scale up max pixels to " + pixels);
SCALE_UP_MAX_PIXELS = pixels;
};
exports.setRenditionScaleUpMaxPixels = setRenditionScaleUpMaxPixels;
/**

@@ -30,0 +31,0 @@ * Finds image rendition that best fits a given container preferring images

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

var webp_check_1 = require("./webp-check");
exports.getSpecificRendition = function (_a, renditionLabel, isStill, useVideo) {
var getSpecificRendition = function (_a, renditionLabel, isStill, useVideo) {
var images = _a.images, isSticker = _a.is_sticker;

@@ -40,3 +40,4 @@ if (isStill === void 0) { isStill = false; }

};
exports.getBestVideo = function (video, width, height) {
exports.getSpecificRendition = getSpecificRendition;
var getBestVideo = function (video, width, height) {
var assets = video === null || video === void 0 ? void 0 : video.assets;

@@ -51,6 +52,7 @@ if (assets) {

};
exports.getBestVideo = getBestVideo;
var getRenditions = function (type, images, video) {
return type === 'video' && video && video.previews && !Object.keys(images).length ? video.previews : images;
};
exports.getBestRendition = function (images, gifWidth, gifHeight, scaleUpMaxPixels) {
var getBestRendition = function (images, gifWidth, gifHeight, scaleUpMaxPixels) {
var checkRenditions = collections_1.pick(images, [

@@ -69,3 +71,4 @@ 'original',

};
exports.getBestRenditionUrl = function (_a, gifWidth, gifHeight, options) {
exports.getBestRendition = getBestRendition;
var getBestRenditionUrl = function (_a, gifWidth, gifHeight, options) {
var images = _a.images, video = _a.video, type = _a.type;

@@ -84,3 +87,4 @@ if (options === void 0) { options = { isStill: false, useVideo: false }; }

};
exports.getGifHeight = function (_a, gifWidth) {
exports.getBestRenditionUrl = getBestRenditionUrl;
var getGifHeight = function (_a, gifWidth) {
var images = _a.images;

@@ -95,3 +99,4 @@ var fixed_width = images.fixed_width;

};
exports.getGifWidth = function (_a, gifHeight) {
exports.getGifHeight = getGifHeight;
var getGifWidth = function (_a, gifHeight) {
var images = _a.images;

@@ -106,2 +111,3 @@ var fixed_width = images.fixed_width;

};
exports.getGifWidth = getGifWidth;
/**

@@ -113,3 +119,3 @@ * GIF Text - Alt Text: Generates alt text for

*/
exports.getAltText = function (_a) {
var getAltText = function (_a) {
var user = _a.user, _b = _a.tags, tags = _b === void 0 ? [] : _b, _c = _a.is_sticker, is_sticker = _c === void 0 ? false : _c, _d = _a.title, title = _d === void 0 ? '' : _d;

@@ -123,2 +129,3 @@ if (title) {

};
exports.getAltText = getAltText;
//# sourceMappingURL=gif-utils.js.map
"use strict";
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};

@@ -32,3 +30,3 @@ Object.defineProperty(exports, "__esModule", { value: true });

if (exports.Logger.ENABLED && exports.Logger.LEVEL <= LogLevel.DEBUG) {
console.debug.apply(console, __spreadArrays([exports.Logger.PREFIX], msg)); // eslint-disable-line no-console
console.debug.apply(console, __spreadArray([exports.Logger.PREFIX], msg)); // eslint-disable-line no-console
}

@@ -42,3 +40,3 @@ },

if (exports.Logger.ENABLED && exports.Logger.LEVEL <= LogLevel.INFO) {
console.info.apply(console, __spreadArrays([exports.Logger.PREFIX], msg)); // eslint-disable-line no-console
console.info.apply(console, __spreadArray([exports.Logger.PREFIX], msg)); // eslint-disable-line no-console
}

@@ -52,3 +50,3 @@ },

if (exports.Logger.ENABLED && exports.Logger.LEVEL <= LogLevel.WARN) {
console.warn.apply(console, __spreadArrays([exports.Logger.PREFIX], msg)); // eslint-disable-line no-console
console.warn.apply(console, __spreadArray([exports.Logger.PREFIX], msg)); // eslint-disable-line no-console
}

@@ -62,3 +60,3 @@ },

if (exports.Logger.ENABLED && exports.Logger.LEVEL <= LogLevel.ERROR) {
console.error.apply(console, __spreadArrays([exports.Logger.PREFIX], msg)); // eslint-disable-line no-console
console.error.apply(console, __spreadArray([exports.Logger.PREFIX], msg)); // eslint-disable-line no-console
}

@@ -65,0 +63,0 @@ },

@@ -13,5 +13,8 @@ "use strict";

: undefined);
exports.getGiphySDKRequestHeaders = function () { return gl._GIPHY_SDK_HEADERS_; };
exports.appendGiphySDKRequestHeader = function (key, value) { var _a; return (_a = exports.getGiphySDKRequestHeaders()) === null || _a === void 0 ? void 0 : _a.set(key, value); };
exports.appendGiphySDKRequestParam = function (key, value) { var _a; return (_a = exports.getGiphySDKRequestHeaders()) === null || _a === void 0 ? void 0 : _a.set(key, value); };
var getGiphySDKRequestHeaders = function () { return gl._GIPHY_SDK_HEADERS_; };
exports.getGiphySDKRequestHeaders = getGiphySDKRequestHeaders;
var appendGiphySDKRequestHeader = function (key, value) { var _a; return (_a = exports.getGiphySDKRequestHeaders()) === null || _a === void 0 ? void 0 : _a.set(key, value); };
exports.appendGiphySDKRequestHeader = appendGiphySDKRequestHeader;
var appendGiphySDKRequestParam = function (key, value) { var _a; return (_a = exports.getGiphySDKRequestHeaders()) === null || _a === void 0 ? void 0 : _a.set(key, value); };
exports.appendGiphySDKRequestParam = appendGiphySDKRequestParam;
//# sourceMappingURL=sdk-headers.js.map

@@ -11,3 +11,3 @@ {

"name": "@giphy/js-util",
"version": "3.1.0",
"version": "3.1.1",
"main": "dist/index.js",

@@ -25,3 +25,3 @@ "description": "Shared giphy js utils",

"dependencies": {
"@giphy/js-types": "^4.0.0",
"@giphy/js-types": "^4.0.1",
"dompurify": "^2.2.2",

@@ -33,5 +33,5 @@ "uuid": "^8.3.0"

"@types/uuid": "^8.3.0",
"typescript": "^4.0.5"
"typescript": "^4.3.5"
},
"gitHead": "412335a79d3a8b88d361709e6e85dae55d06adfe"
"gitHead": "75a177672ad9d5b4c29163728184d0ebda557cab"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc