@giphy/js-util
Advanced tools
Comparing version 4.2.0 to 4.3.0
@@ -22,3 +22,3 @@ import { IGif, IImage, IImages, IRendition } from '@giphy/js-types'; | ||
*/ | ||
export declare const getAltText: ({ user, tags, is_sticker, title }: IGif) => string; | ||
export declare const getAltText: ({ alt_text, user, tags, is_sticker, title }: IGif) => string; | ||
export {}; |
@@ -113,3 +113,6 @@ "use strict"; | ||
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; | ||
var alt_text = _a.alt_text, 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; | ||
if (alt_text) { | ||
return alt_text; | ||
} | ||
if (title) { | ||
@@ -116,0 +119,0 @@ return title; |
@@ -11,3 +11,3 @@ { | ||
"name": "@giphy/js-util", | ||
"version": "4.2.0", | ||
"version": "4.3.0", | ||
"main": "dist/index.js", | ||
@@ -26,3 +26,3 @@ "description": "Shared giphy js utils", | ||
"dependencies": { | ||
"@giphy/js-types": "^4.3.0", | ||
"@giphy/js-types": "^4.4.0", | ||
"dompurify": "^2.2.2", | ||
@@ -36,3 +36,3 @@ "uuid": "^8.3.0" | ||
}, | ||
"gitHead": "9fa6aac4df3881d705251b7d6ee462e8889dbd60" | ||
"gitHead": "cc3bff42f7320515d7e89e88dec53223e1ef3f54" | ||
} |
@@ -117,3 +117,6 @@ import { IGif, IImage, IImages, ImageAllTypes, IRendition } from '@giphy/js-types' | ||
*/ | ||
export const getAltText = ({ user, tags = [], is_sticker = false, title = '' }: IGif): string => { | ||
export const getAltText = ({ alt_text, user, tags = [], is_sticker = false, title = '' }: IGif): string => { | ||
if (alt_text) { | ||
return alt_text | ||
} | ||
if (title) { | ||
@@ -120,0 +123,0 @@ return title |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
71292
1360
Updated@giphy/js-types@^4.4.0