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

@twurple/common

Package Overview
Dependencies
Maintainers
2
Versions
147
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@twurple/common - npm Package Compare versions

Comparing version 5.0.0-pre.15 to 5.0.0-pre.16

35

lib/emotes/ChatEmote.d.ts

@@ -5,9 +5,34 @@ import { DataObject } from '../DataObject';

code: string;
id: number;
id: string;
}
/**
* The different possible emote size identifiers.
* The possible animation settings for an emote image.
*/
export declare type EmoteAnimationSettings = 'default' | 'static' | 'animated';
/**
* The possible background types to optimize the emote display for.
*/
export declare type EmoteBackgroundType = 'light' | 'dark';
/**
* The possible emote size multipliers.
*/
export declare type EmoteSize = '1.0' | '2.0' | '3.0';
/**
* The display settings for an emote.
*/
export interface EmoteSettings {
/**
* The animation settings of the emote.
*/
animationSettings: EmoteAnimationSettings;
/**
* The background type of the emote.
*/
backgroundType: EmoteBackgroundType;
/**
* The size multiplier of the emote.
*/
size: EmoteSize;
}
/**
* A chat emote.

@@ -19,3 +44,3 @@ */

*/
get id(): number;
get id(): string;
/**

@@ -28,6 +53,6 @@ * The emote code, i.e. how you write it in chat.

*
* @param size The pixel density of the emote image.
* @param settings The display settings of the emote image.
*/
getUrl(size: EmoteSize): string;
getUrl(settings: EmoteSettings): string;
}
//# sourceMappingURL=ChatEmote.d.ts.map

7

lib/emotes/ChatEmote.js

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

*
* @param size The pixel density of the emote image.
* @param settings The display settings of the emote image.
*/
getUrl(size) {
return `https://static-cdn.jtvnw.net/emoticons/v1/${this.id}/${size}`;
getUrl(settings) {
const { animationSettings = 'default', backgroundType = 'dark', size = '1.0' } = settings;
return `https://static-cdn.jtvnw.net/emoticons/v2/${this.id}/${animationSettings}/${backgroundType}/${size}`;
}

@@ -32,0 +33,0 @@ };

{
"name": "@twurple/common",
"version": "5.0.0-pre.15",
"version": "5.0.0-pre.16",
"publishConfig": {

@@ -47,3 +47,3 @@ "access": "public"

},
"gitHead": "bc84b6a9e404cd76197fe65d9d99f8667e4337bb"
"gitHead": "6884845a0d7715ce8bfabcc27c74e2cc75f75e7c"
}

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