@mkody/twitch-emoticons
Version:
Gets Twitch, BTTV, FFZ and 7TV emotes as well as parsing text to emotes!
798 lines (212 loc) • 13.4 kB
HTML
<html lang="en">
<head>
<meta charset="utf-8">
<title>Collection - Documentation</title>
<script src="scripts/prettify/prettify.js"></script>
<script src="scripts/prettify/lang-css.js"></script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
<script src="scripts/nav.js" defer></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger" class="navicon-button x">
<div class="navicon"></div>
</label>
<label for="nav-trigger" class="overlay"></label>
<nav >
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="BTTVEmote.html">BTTVEmote</a><ul class='methods'><li data-type='method'><a href="BTTVEmote.html#toLink">toLink</a></li><li data-type='method'><a href="BTTVEmote.html#toObject">toObject</a></li><li data-type='method'><a href="BTTVEmote.html#.fromObject">fromObject</a></li></ul></li><li><a href="Channel.html">Channel</a><ul class='methods'><li data-type='method'><a href="Channel.html#fetchBTTVEmotes">fetchBTTVEmotes</a></li><li data-type='method'><a href="Channel.html#fetchFFZEmotes">fetchFFZEmotes</a></li><li data-type='method'><a href="Channel.html#fetchSevenTVEmotes">fetchSevenTVEmotes</a></li></ul></li><li><a href="Collection.html">Collection</a><ul class='methods'><li data-type='method'><a href="Collection.html#filter">filter</a></li><li data-type='method'><a href="Collection.html#find">find</a></li><li data-type='method'><a href="Collection.html#map">map</a></li></ul></li><li><a href="Emote.html">Emote</a><ul class='methods'><li data-type='method'><a href="Emote.html#toObject">toObject</a></li></ul></li><li><a href="EmoteFetcher.html">EmoteFetcher</a><ul class='methods'><li data-type='method'><a href="EmoteFetcher.html#_cacheBTTVEmote">_cacheBTTVEmote</a></li><li data-type='method'><a href="EmoteFetcher.html#_cacheFFZEmote">_cacheFFZEmote</a></li><li data-type='method'><a href="EmoteFetcher.html#_cacheSevenTVEmote">_cacheSevenTVEmote</a></li><li data-type='method'><a href="EmoteFetcher.html#_cacheTwitchEmote">_cacheTwitchEmote</a></li><li data-type='method'><a href="EmoteFetcher.html#_getRawBTTVEmotes">_getRawBTTVEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#_getRawFFZEmoteSet">_getRawFFZEmoteSet</a></li><li data-type='method'><a href="EmoteFetcher.html#_getRawFFZEmotes">_getRawFFZEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#_getRawSevenTVEmotes">_getRawSevenTVEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#_getRawTwitchEmotes">_getRawTwitchEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#_setupChannel">_setupChannel</a></li><li data-type='method'><a href="EmoteFetcher.html#fetchBTTVEmotes">fetchBTTVEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#fetchFFZEmotes">fetchFFZEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#fetchSevenTVEmotes">fetchSevenTVEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#fetchTwitchEmotes">fetchTwitchEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#fromObject">fromObject</a></li></ul></li><li><a href="EmoteParser.html">EmoteParser</a><ul class='methods'><li data-type='method'><a href="EmoteParser.html#parse">parse</a></li></ul></li><li><a href="FFZEmote.html">FFZEmote</a><ul class='methods'><li data-type='method'><a href="FFZEmote.html#toLink">toLink</a></li><li data-type='method'><a href="FFZEmote.html#toObject">toObject</a></li><li data-type='method'><a href="FFZEmote.html#.fromObject">fromObject</a></li></ul></li><li><a href="SevenTVEmote.html">SevenTVEmote</a><ul class='methods'><li data-type='method'><a href="SevenTVEmote.html#toLink">toLink</a></li><li data-type='method'><a href="SevenTVEmote.html#toObject">toObject</a></li><li data-type='method'><a href="SevenTVEmote.html#.fromObject">fromObject</a></li></ul></li><li><a href="TwitchEmote.html">TwitchEmote</a><ul class='methods'><li data-type='method'><a href="TwitchEmote.html#toLink">toLink</a></li><li data-type='method'><a href="TwitchEmote.html#toObject">toObject</a></li><li data-type='method'><a href="TwitchEmote.html#.fromObject">fromObject</a></li></ul></li></ul>
</nav>
<div id="main">
<h1 class="page-title">Collection</h1>
<section>
<header>
<h2>
Collection
</h2>
</header>
<article>
<div class="container-overview">
<h4 class="name" id="Collection"><span class="type-signature"></span>new Collection<span class="signature">()</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-description">Description:</dt>
<dd class="tag-description"><ul class="dummy"><li><p>An extended Map with utility methods.</p></li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="util_Collection.js.html">util/Collection.js</a>, <a href="util_Collection.js.html#line1">line 1</a>
</li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id="filter"><span class="type-signature"></span>filter<span class="signature">(func, thisArg<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {<a href="Collection.html">Collection</a>}</span></h4>
<dl class="details">
<dt class="tag-description">Description:</dt>
<dd class="tag-description"><ul class="dummy"><li><p>Filters cache by function.<br>
Same as <code>Array#filter</code>.</p></li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="util_Collection.js.html">util/Collection.js</a>, <a href="util_Collection.js.html#line43">line 43</a>
</li></ul></dd>
</dl>
<h5 class="h5-parameters">Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>func</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="attributes">
</td>
<td class="description last"><p>Function to test.</p></td>
</tr>
<tr>
<td class="name"><code>thisArg</code></td>
<td class="type">
<span class="param-type">any</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last"><p>The context for the function.</p></td>
</tr>
</tbody>
</table>
<h5 class="h5-returns">Returns:</h5>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Collection.html">Collection</a></span>
</dd>
</dl>
<h4 class="name" id="find"><span class="type-signature"></span>find<span class="signature">(propOrFunc, value<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {any}</span></h4>
<dl class="details">
<dt class="tag-description">Description:</dt>
<dd class="tag-description"><ul class="dummy"><li><p>Finds first matching value by property or function.<br>
Same as <code>Array#find</code>.</p></li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="util_Collection.js.html">util/Collection.js</a>, <a href="util_Collection.js.html#line13">line 13</a>
</li></ul></dd>
</dl>
<h5 class="h5-parameters">Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>propOrFunc</code></td>
<td class="type">
<span class="param-type">string</span>
|
<span class="param-type">function</span>
</td>
<td class="attributes">
</td>
<td class="description last"><p>Property or function to test.</p></td>
</tr>
<tr>
<td class="name"><code>value</code></td>
<td class="type">
<span class="param-type">any</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last"><p>Value to find.</p></td>
</tr>
</tbody>
</table>
<h5 class="h5-returns">Returns:</h5>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">any</span>
</dd>
</dl>
<h4 class="name" id="map"><span class="type-signature"></span>map<span class="signature">(func, thisArg<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Array.<any>}</span></h4>
<dl class="details">
<dt class="tag-description">Description:</dt>
<dd class="tag-description"><ul class="dummy"><li><p>Maps cache by function.<br>
Same as <code>Array#map</code>.</p></li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="util_Collection.js.html">util/Collection.js</a>, <a href="util_Collection.js.html#line64">line 64</a>
</li></ul></dd>
</dl>
<h5 class="h5-parameters">Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>func</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="attributes">
</td>
<td class="description last"><p>Function to use.</p></td>
</tr>
<tr>
<td class="name"><code>thisArg</code></td>
<td class="type">
<span class="param-type">any</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last"><p>The context for the function.</p></td>
</tr>
</tbody>
</table>
<h5 class="h5-returns">Returns:</h5>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">Array.<any></span>
</dd>
</dl>
</article>
</section>
</div>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.4</a> using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>
<script>prettyPrint();</script>
<script src="scripts/polyfill.js"></script>
<script src="scripts/linenumber.js"></script>
</body>
</html>