1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-01 16:46:54 +03:00
Files
node-redis/documentation/index.html
documentation-bot c6b6c35590 Updates
2025-06-25 12:42:14 +00:00

221 lines
52 KiB
HTML

<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>redis-monorepo</title><meta name="description" content="Documentation for redis-monorepo"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="assets/style.css"/><link rel="stylesheet" href="assets/highlight.css"/><script defer src="assets/main.js"></script><script async src="assets/search.js" id="tsd-search-script"></script><script async src="assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base="."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="index.html" class="title">redis-monorepo</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><h2>redis-monorepo</h2></div><div class="tsd-panel tsd-typography"><a id="md:node-redis" class="tsd-anchor"></a><h1><a href="#md:node-redis">Node-Redis</a></h1><p><a href="https://github.com/redis/node-redis/actions/workflows/tests.yml"><img src="https://img.shields.io/github/actions/workflow/status/redis/node-redis/tests.yml?branch=master" alt="Tests"></a>
<a href="https://codecov.io/gh/redis/node-redis"><img src="https://codecov.io/gh/redis/node-redis/branch/master/graph/badge.svg?token=xcfqHhJC37" alt="Coverage"></a>
<a href="https://github.com/redis/node-redis/blob/master/LICENSE"><img src="https://img.shields.io/github/license/redis/node-redis.svg" alt="License"></a></p>
<p><a href="https://discord.gg/redis"><img src="https://img.shields.io/discord/697882427875393627.svg?style=social&logo=discord" alt="Discord"></a>
<a href="https://www.twitch.tv/redisinc"><img src="https://img.shields.io/twitch/status/redisinc?style=social" alt="Twitch"></a>
<a href="https://www.youtube.com/redisinc"><img src="https://img.shields.io/youtube/channel/views/UCD78lHSwYqMlyetR0_P4Vig?style=social" alt="YouTube"></a>
<a href="https://twitter.com/redisinc"><img src="https://img.shields.io/twitter/follow/redisinc?style=social" alt="Twitter"></a></p>
<p>node-redis is a modern, high performance <a href="https://redis.io">Redis</a> client for Node.js.</p>
<a id="md:how-do-i-redis" class="tsd-anchor"></a><h2><a href="#md:how-do-i-redis">How do I Redis?</a></h2><p><a href="https://university.redis.com/">Learn for free at Redis University</a></p>
<p><a href="https://launchpad.redis.com/">Build faster with the Redis Launchpad</a></p>
<p><a href="https://redis.com/try-free/">Try the Redis Cloud</a></p>
<p><a href="https://developer.redis.com/">Dive in developer tutorials</a></p>
<p><a href="https://redis.com/community/">Join the Redis community</a></p>
<p><a href="https://redis.com/company/careers/jobs/">Work at Redis</a></p>
<a id="md:installation" class="tsd-anchor"></a><h2><a href="#md:installation">Installation</a></h2><p>Start a redis via docker:</p>
<pre><code class="language-bash"><span class="hl-0">docker</span><span class="hl-1"> </span><span class="hl-2">run</span><span class="hl-1"> </span><span class="hl-3">-p</span><span class="hl-1"> </span><span class="hl-4">6379</span><span class="hl-2">:6379</span><span class="hl-1"> </span><span class="hl-3">-d</span><span class="hl-1"> </span><span class="hl-2">redis:8.0-rc1</span>
</code><button>Copy</button></pre>
<p>To install node-redis, simply:</p>
<pre><code class="language-bash"><span class="hl-0">npm</span><span class="hl-1"> </span><span class="hl-2">install</span><span class="hl-1"> </span><span class="hl-2">redis</span>
</code><button>Copy</button></pre>
<blockquote>
<p>&quot;redis&quot; is the &quot;whole in one&quot; package that includes all the other packages. If you only need a subset of the commands,
you can install the individual packages. See the list below.</p>
</blockquote>
<a id="md:packages" class="tsd-anchor"></a><h2><a href="#md:packages">Packages</a></h2><table>
<thead>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody><tr>
<td><a href="https://github.com/redis/node-redis/tree/master/packages/redis"><code>redis</code></a></td>
<td>The client with all the <a href="https://github.com/redis-stack/redis-stack">&quot;redis-stack&quot;</a> modules</td>
</tr>
<tr>
<td><a href="https://github.com/redis/node-redis/tree/master/packages/client"><code>@redis/client</code></a></td>
<td>The base clients (i.e <code>RedisClient</code>, <code>RedisCluster</code>, etc.)</td>
</tr>
<tr>
<td><a href="https://github.com/redis/node-redis/tree/master/packages/bloom"><code>@redis/bloom</code></a></td>
<td><a href="https://redis.io/docs/data-types/probabilistic/">Redis Bloom</a> commands</td>
</tr>
<tr>
<td><a href="https://github.com/redis/node-redis/tree/master/packages/json"><code>@redis/json</code></a></td>
<td><a href="https://redis.io/docs/data-types/json/">Redis JSON</a> commands</td>
</tr>
<tr>
<td><a href="https://github.com/redis/node-redis/tree/master/packages/search"><code>@redis/search</code></a></td>
<td><a href="https://redis.io/docs/interact/search-and-query/">RediSearch</a> commands</td>
</tr>
<tr>
<td><a href="https://github.com/redis/node-redis/tree/master/packages/time-series"><code>@redis/time-series</code></a></td>
<td><a href="https://redis.io/docs/data-types/timeseries/">Redis Time-Series</a> commands</td>
</tr>
<tr>
<td><a href="https://github.com/redis/node-redis/tree/master/packages/entraid"><code>@redis/entraid</code></a></td>
<td>Secure token-based authentication for Redis clients using Microsoft Entra ID</td>
</tr>
</tbody></table>
<blockquote>
<p>Looking for a high-level library to handle object mapping?
See <a href="https://github.com/redis/redis-om-node">redis-om-node</a>!</p>
</blockquote>
<a id="md:usage" class="tsd-anchor"></a><h2><a href="#md:usage">Usage</a></h2><a id="md:basic-example" class="tsd-anchor"></a><h3><a href="#md:basic-example">Basic Example</a></h3><pre><code class="language-typescript"><span class="hl-5">import</span><span class="hl-1"> { </span><span class="hl-6">createClient</span><span class="hl-1"> } </span><span class="hl-5">from</span><span class="hl-1"> </span><span class="hl-2">&quot;redis&quot;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-7">client</span><span class="hl-1"> = </span><span class="hl-5">await</span><span class="hl-1"> </span><span class="hl-0">createClient</span><span class="hl-1">()</span><br/><span class="hl-1"> .</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&quot;error&quot;</span><span class="hl-1">, (</span><span class="hl-6">err</span><span class="hl-1">) </span><span class="hl-3">=&gt;</span><span class="hl-1"> </span><span class="hl-6">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&quot;Redis Client Error&quot;</span><span class="hl-1">, </span><span class="hl-6">err</span><span class="hl-1">))</span><br/><span class="hl-1"> .</span><span class="hl-0">connect</span><span class="hl-1">();</span><br/><br/><span class="hl-5">await</span><span class="hl-1"> </span><span class="hl-6">client</span><span class="hl-1">.</span><span class="hl-0">set</span><span class="hl-1">(</span><span class="hl-2">&quot;key&quot;</span><span class="hl-1">, </span><span class="hl-2">&quot;value&quot;</span><span class="hl-1">);</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-7">value</span><span class="hl-1"> = </span><span class="hl-5">await</span><span class="hl-1"> </span><span class="hl-6">client</span><span class="hl-1">.</span><span class="hl-0">get</span><span class="hl-1">(</span><span class="hl-2">&quot;key&quot;</span><span class="hl-1">);</span><br/><span class="hl-6">client</span><span class="hl-1">.</span><span class="hl-0">destroy</span><span class="hl-1">();</span>
</code><button>Copy</button></pre>
<p>The above code connects to localhost on port 6379. To connect to a different host or port, use a connection string in
the format <code>redis[s]://[[username][:password]@][host][:port][/db-number]</code>:</p>
<pre><code class="language-typescript"><span class="hl-0">createClient</span><span class="hl-1">({</span><br/><span class="hl-1"> </span><span class="hl-6">url:</span><span class="hl-1"> </span><span class="hl-2">&quot;redis://alice:foobared@awesome.redis.server:6380&quot;</span><span class="hl-1">,</span><br/><span class="hl-1">});</span>
</code><button>Copy</button></pre>
<p>You can also use discrete parameters, UNIX sockets, and even TLS to connect. Details can be found in
the <a href="https://github.com/redis/node-redis/blob/master/docs/client-configuration.md">client configuration guide</a>.</p>
<p>To check if the the client is connected and ready to send commands, use <code>client.isReady</code> which returns a boolean.
<code>client.isOpen</code> is also available. This returns <code>true</code> when the client&#39;s underlying socket is open, and <code>false</code> when it
isn&#39;t (for example when the client is still connecting or reconnecting after a network error).</p>
<a id="md:redis-commands" class="tsd-anchor"></a><h3><a href="#md:redis-commands">Redis Commands</a></h3><p>There is built-in support for all of the <a href="https://redis.io/commands">out-of-the-box Redis commands</a>. They are exposed
using the raw Redis command names (<code>HSET</code>, <code>HGETALL</code>, etc.) and a friendlier camel-cased version (<code>hSet</code>, <code>hGetAll</code>,
etc.):</p>
<pre><code class="language-typescript"><span class="hl-8">// raw Redis commands</span><br/><span class="hl-5">await</span><span class="hl-1"> </span><span class="hl-6">client</span><span class="hl-1">.</span><span class="hl-0">HSET</span><span class="hl-1">(</span><span class="hl-2">&quot;key&quot;</span><span class="hl-1">, </span><span class="hl-2">&quot;field&quot;</span><span class="hl-1">, </span><span class="hl-2">&quot;value&quot;</span><span class="hl-1">);</span><br/><span class="hl-5">await</span><span class="hl-1"> </span><span class="hl-6">client</span><span class="hl-1">.</span><span class="hl-0">HGETALL</span><span class="hl-1">(</span><span class="hl-2">&quot;key&quot;</span><span class="hl-1">);</span><br/><br/><span class="hl-8">// friendly JavaScript commands</span><br/><span class="hl-5">await</span><span class="hl-1"> </span><span class="hl-6">client</span><span class="hl-1">.</span><span class="hl-0">hSet</span><span class="hl-1">(</span><span class="hl-2">&quot;key&quot;</span><span class="hl-1">, </span><span class="hl-2">&quot;field&quot;</span><span class="hl-1">, </span><span class="hl-2">&quot;value&quot;</span><span class="hl-1">);</span><br/><span class="hl-5">await</span><span class="hl-1"> </span><span class="hl-6">client</span><span class="hl-1">.</span><span class="hl-0">hGetAll</span><span class="hl-1">(</span><span class="hl-2">&quot;key&quot;</span><span class="hl-1">);</span>
</code><button>Copy</button></pre>
<p>Modifiers to commands are specified using a JavaScript object:</p>
<pre><code class="language-typescript"><span class="hl-5">await</span><span class="hl-1"> </span><span class="hl-6">client</span><span class="hl-1">.</span><span class="hl-0">set</span><span class="hl-1">(</span><span class="hl-2">&quot;key&quot;</span><span class="hl-1">, </span><span class="hl-2">&quot;value&quot;</span><span class="hl-1">, {</span><br/><span class="hl-1"> </span><span class="hl-6">EX:</span><span class="hl-1"> </span><span class="hl-4">10</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-6">NX:</span><span class="hl-1"> </span><span class="hl-3">true</span><span class="hl-1">,</span><br/><span class="hl-1">});</span>
</code><button>Copy</button></pre>
<p>Replies will be transformed into useful data structures:</p>
<pre><code class="language-typescript"><span class="hl-5">await</span><span class="hl-1"> </span><span class="hl-6">client</span><span class="hl-1">.</span><span class="hl-0">hGetAll</span><span class="hl-1">(</span><span class="hl-2">&quot;key&quot;</span><span class="hl-1">); </span><span class="hl-8">// { field1: &#39;value1&#39;, field2: &#39;value2&#39; }</span><br/><span class="hl-5">await</span><span class="hl-1"> </span><span class="hl-6">client</span><span class="hl-1">.</span><span class="hl-0">hVals</span><span class="hl-1">(</span><span class="hl-2">&quot;key&quot;</span><span class="hl-1">); </span><span class="hl-8">// [&#39;value1&#39;, &#39;value2&#39;]</span>
</code><button>Copy</button></pre>
<p><code>Buffer</code>s are supported as well:</p>
<pre><code class="language-typescript"><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-7">client</span><span class="hl-1"> = </span><span class="hl-0">createClient</span><span class="hl-1">().</span><span class="hl-0">withTypeMapping</span><span class="hl-1">({</span><br/><span class="hl-1"> </span><span class="hl-6">[</span><span class="hl-7">RESP_TYPES</span><span class="hl-6">.</span><span class="hl-7">BLOB_STRING</span><span class="hl-6">]:</span><span class="hl-1"> </span><span class="hl-6">Buffer</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-5">await</span><span class="hl-1"> </span><span class="hl-6">client</span><span class="hl-1">.</span><span class="hl-0">hSet</span><span class="hl-1">(</span><span class="hl-2">&quot;key&quot;</span><span class="hl-1">, </span><span class="hl-2">&quot;field&quot;</span><span class="hl-1">, </span><span class="hl-6">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">(</span><span class="hl-2">&quot;value&quot;</span><span class="hl-1">)); </span><span class="hl-8">// &#39;OK&#39;</span><br/><span class="hl-5">await</span><span class="hl-1"> </span><span class="hl-6">client</span><span class="hl-1">.</span><span class="hl-0">hGet</span><span class="hl-1">(</span><span class="hl-2">&quot;key&quot;</span><span class="hl-1">, </span><span class="hl-2">&quot;field&quot;</span><span class="hl-1">); </span><span class="hl-8">// { field: &lt;Buffer 76 61 6c 75 65&gt; }</span><br/>
</code><button>Copy</button></pre>
<a id="md:unsupported-redis-commands" class="tsd-anchor"></a><h3><a href="#md:unsupported-redis-commands">Unsupported Redis Commands</a></h3><p>If you want to run commands and/or use arguments that Node Redis doesn&#39;t know about (yet!) use <code>.sendCommand()</code>:</p>
<pre><code class="language-typescript"><span class="hl-5">await</span><span class="hl-1"> </span><span class="hl-6">client</span><span class="hl-1">.</span><span class="hl-0">sendCommand</span><span class="hl-1">([</span><span class="hl-2">&quot;SET&quot;</span><span class="hl-1">, </span><span class="hl-2">&quot;key&quot;</span><span class="hl-1">, </span><span class="hl-2">&quot;value&quot;</span><span class="hl-1">, </span><span class="hl-2">&quot;NX&quot;</span><span class="hl-1">]); </span><span class="hl-8">// &#39;OK&#39;</span><br/><br/><span class="hl-5">await</span><span class="hl-1"> </span><span class="hl-6">client</span><span class="hl-1">.</span><span class="hl-0">sendCommand</span><span class="hl-1">([</span><span class="hl-2">&quot;HGETALL&quot;</span><span class="hl-1">, </span><span class="hl-2">&quot;key&quot;</span><span class="hl-1">]); </span><span class="hl-8">// [&#39;key1&#39;, &#39;field1&#39;, &#39;key2&#39;, &#39;field2&#39;]</span>
</code><button>Copy</button></pre>
<a id="md:transactions-multiexec" class="tsd-anchor"></a><h3><a href="#md:transactions-multiexec">Transactions (Multi/Exec)</a></h3><p>Start a <a href="https://redis.io/topics/transactions">transaction</a> by calling <code>.multi()</code>, then chaining your commands. When
you&#39;re done, call <code>.exec()</code> and you&#39;ll get an array back with your results:</p>
<pre><code class="language-typescript"><span class="hl-5">await</span><span class="hl-1"> </span><span class="hl-6">client</span><span class="hl-1">.</span><span class="hl-0">set</span><span class="hl-1">(</span><span class="hl-2">&quot;another-key&quot;</span><span class="hl-1">, </span><span class="hl-2">&quot;another-value&quot;</span><span class="hl-1">);</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> [</span><span class="hl-7">setKeyReply</span><span class="hl-1">, </span><span class="hl-7">otherKeyValue</span><span class="hl-1">] = </span><span class="hl-5">await</span><span class="hl-1"> </span><span class="hl-6">client</span><br/><span class="hl-1"> .</span><span class="hl-0">multi</span><span class="hl-1">()</span><br/><span class="hl-1"> .</span><span class="hl-0">set</span><span class="hl-1">(</span><span class="hl-2">&quot;key&quot;</span><span class="hl-1">, </span><span class="hl-2">&quot;value&quot;</span><span class="hl-1">)</span><br/><span class="hl-1"> .</span><span class="hl-0">get</span><span class="hl-1">(</span><span class="hl-2">&quot;another-key&quot;</span><span class="hl-1">)</span><br/><span class="hl-1"> .</span><span class="hl-0">exec</span><span class="hl-1">(); </span><span class="hl-8">// [&#39;OK&#39;, &#39;another-value&#39;]</span>
</code><button>Copy</button></pre>
<p>You can also <a href="https://redis.io/topics/transactions#optimistic-locking-using-check-and-set">watch</a> keys by calling
<code>.watch()</code>. Your transaction will abort if any of the watched keys change.</p>
<a id="md:blocking-commands" class="tsd-anchor"></a><h3><a href="#md:blocking-commands">Blocking Commands</a></h3><p>In v4, <code>RedisClient</code> had the ability to create a pool of connections using an &quot;Isolation Pool&quot; on top of the &quot;main&quot;
connection. However, there was no way to use the pool without a &quot;main&quot; connection:</p>
<pre><code class="language-javascript"><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-7">client</span><span class="hl-1"> = </span><span class="hl-5">await</span><span class="hl-1"> </span><span class="hl-0">createClient</span><span class="hl-1">()</span><br/><span class="hl-1"> .</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&quot;error&quot;</span><span class="hl-1">, (</span><span class="hl-6">err</span><span class="hl-1">) </span><span class="hl-3">=&gt;</span><span class="hl-1"> </span><span class="hl-6">console</span><span class="hl-1">.</span><span class="hl-0">error</span><span class="hl-1">(</span><span class="hl-6">err</span><span class="hl-1">))</span><br/><span class="hl-1"> .</span><span class="hl-0">connect</span><span class="hl-1">();</span><br/><br/><span class="hl-5">await</span><span class="hl-1"> </span><span class="hl-6">client</span><span class="hl-1">.</span><span class="hl-0">ping</span><span class="hl-1">(</span><span class="hl-6">client</span><span class="hl-1">.</span><span class="hl-0">commandOptions</span><span class="hl-1">({ </span><span class="hl-6">isolated:</span><span class="hl-1"> </span><span class="hl-3">true</span><span class="hl-1"> }));</span>
</code><button>Copy</button></pre>
<p>In v5 we&#39;ve extracted this pool logic into its own class—<code>RedisClientPool</code>:</p>
<pre><code class="language-javascript"><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-7">pool</span><span class="hl-1"> = </span><span class="hl-5">await</span><span class="hl-1"> </span><span class="hl-0">createClientPool</span><span class="hl-1">()</span><br/><span class="hl-1"> .</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&quot;error&quot;</span><span class="hl-1">, (</span><span class="hl-6">err</span><span class="hl-1">) </span><span class="hl-3">=&gt;</span><span class="hl-1"> </span><span class="hl-6">console</span><span class="hl-1">.</span><span class="hl-0">error</span><span class="hl-1">(</span><span class="hl-6">err</span><span class="hl-1">))</span><br/><span class="hl-1"> .</span><span class="hl-0">connect</span><span class="hl-1">();</span><br/><br/><span class="hl-5">await</span><span class="hl-1"> </span><span class="hl-6">pool</span><span class="hl-1">.</span><span class="hl-0">ping</span><span class="hl-1">();</span>
</code><button>Copy</button></pre>
<a id="md:pubsub" class="tsd-anchor"></a><h3><a href="#md:pubsub">Pub/Sub</a></h3><p>See the <a href="https://github.com/redis/node-redis/blob/master/docs/pub-sub.md">Pub/Sub overview</a>.</p>
<a id="md:scan-iterator" class="tsd-anchor"></a><h3><a href="#md:scan-iterator">Scan Iterator</a></h3><p><a href="https://redis.io/commands/scan"><code>SCAN</code></a> results can be looped over
using <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/asyncIterator">async iterators</a>:</p>
<pre><code class="language-typescript"><span class="hl-5">for</span><span class="hl-1"> </span><span class="hl-5">await</span><span class="hl-1"> (</span><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-7">key</span><span class="hl-1"> </span><span class="hl-3">of</span><span class="hl-1"> </span><span class="hl-6">client</span><span class="hl-1">.</span><span class="hl-0">scanIterator</span><span class="hl-1">()) {</span><br/><span class="hl-1"> </span><span class="hl-8">// use the key!</span><br/><span class="hl-1"> </span><span class="hl-5">await</span><span class="hl-1"> </span><span class="hl-6">client</span><span class="hl-1">.</span><span class="hl-0">get</span><span class="hl-1">(</span><span class="hl-6">key</span><span class="hl-1">);</span><br/><span class="hl-1">}</span>
</code><button>Copy</button></pre>
<p>This works with <code>HSCAN</code>, <code>SSCAN</code>, and <code>ZSCAN</code> too:</p>
<pre><code class="language-typescript"><span class="hl-5">for</span><span class="hl-1"> </span><span class="hl-5">await</span><span class="hl-1"> (</span><span class="hl-3">const</span><span class="hl-1"> { </span><span class="hl-7">field</span><span class="hl-1">, </span><span class="hl-7">value</span><span class="hl-1"> } </span><span class="hl-3">of</span><span class="hl-1"> </span><span class="hl-6">client</span><span class="hl-1">.</span><span class="hl-0">hScanIterator</span><span class="hl-1">(</span><span class="hl-2">&quot;hash&quot;</span><span class="hl-1">)) {</span><br/><span class="hl-1">}</span><br/><span class="hl-5">for</span><span class="hl-1"> </span><span class="hl-5">await</span><span class="hl-1"> (</span><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-7">member</span><span class="hl-1"> </span><span class="hl-3">of</span><span class="hl-1"> </span><span class="hl-6">client</span><span class="hl-1">.</span><span class="hl-0">sScanIterator</span><span class="hl-1">(</span><span class="hl-2">&quot;set&quot;</span><span class="hl-1">)) {</span><br/><span class="hl-1">}</span><br/><span class="hl-5">for</span><span class="hl-1"> </span><span class="hl-5">await</span><span class="hl-1"> (</span><span class="hl-3">const</span><span class="hl-1"> { </span><span class="hl-7">score</span><span class="hl-1">, </span><span class="hl-7">value</span><span class="hl-1"> } </span><span class="hl-3">of</span><span class="hl-1"> </span><span class="hl-6">client</span><span class="hl-1">.</span><span class="hl-0">zScanIterator</span><span class="hl-1">(</span><span class="hl-2">&quot;sorted-set&quot;</span><span class="hl-1">)) {</span><br/><span class="hl-1">}</span>
</code><button>Copy</button></pre>
<p>You can override the default options by providing a configuration object:</p>
<pre><code class="language-typescript"><span class="hl-6">client</span><span class="hl-1">.</span><span class="hl-0">scanIterator</span><span class="hl-1">({</span><br/><span class="hl-1"> </span><span class="hl-6">TYPE:</span><span class="hl-1"> </span><span class="hl-2">&quot;string&quot;</span><span class="hl-1">, </span><span class="hl-8">// `SCAN` only</span><br/><span class="hl-1"> </span><span class="hl-6">MATCH:</span><span class="hl-1"> </span><span class="hl-2">&quot;patter*&quot;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-6">COUNT:</span><span class="hl-1"> </span><span class="hl-4">100</span><span class="hl-1">,</span><br/><span class="hl-1">});</span>
</code><button>Copy</button></pre>
<a id="md:disconnecting" class="tsd-anchor"></a><h3><a href="#md:disconnecting">Disconnecting</a></h3><p>The <code>QUIT</code> command has been deprecated in Redis 7.2 and should now also be considered deprecated in Node-Redis. Instead
of sending a <code>QUIT</code> command to the server, the client can simply close the network connection.</p>
<p><code>client.QUIT/quit()</code> is replaced by <code>client.close()</code>. and, to avoid confusion, <code>client.disconnect()</code> has been renamed to
<code>client.destroy()</code>.</p>
<pre><code class="language-typescript"><span class="hl-6">client</span><span class="hl-1">.</span><span class="hl-0">destroy</span><span class="hl-1">();</span>
</code><button>Copy</button></pre>
<a id="md:client-side-caching" class="tsd-anchor"></a><h3><a href="#md:client-side-caching">Client Side Caching</a></h3><p>Node Redis v5 adds support for <a href="https://redis.io/docs/manual/client-side-caching/">Client Side Caching</a>, which enables clients to cache query results locally. The Redis server will notify the client when cached results are no longer valid.</p>
<pre><code class="language-typescript"><span class="hl-8">// Enable client side caching with RESP3</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-7">client</span><span class="hl-1"> = </span><span class="hl-0">createClient</span><span class="hl-1">({</span><br/><span class="hl-1"> </span><span class="hl-6">RESP:</span><span class="hl-1"> </span><span class="hl-4">3</span><span class="hl-1">, </span><br/><span class="hl-1"> </span><span class="hl-6">clientSideCache:</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-6">ttl:</span><span class="hl-1"> </span><span class="hl-4">0</span><span class="hl-1">, </span><span class="hl-8">// Time-to-live (0 = no expiration)</span><br/><span class="hl-1"> </span><span class="hl-6">maxEntries:</span><span class="hl-1"> </span><span class="hl-4">0</span><span class="hl-1">, </span><span class="hl-8">// Maximum entries (0 = unlimited)</span><br/><span class="hl-1"> </span><span class="hl-6">evictPolicy:</span><span class="hl-1"> </span><span class="hl-2">&quot;LRU&quot;</span><span class="hl-1"> </span><span class="hl-8">// Eviction policy: &quot;LRU&quot; or &quot;FIFO&quot;</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">});</span>
</code><button>Copy</button></pre>
<p>See the <a href="https://github.com/redis/node-redis/blob/master/docs/v5.md#client-side-caching">V5 documentation</a> for more details and advanced usage.</p>
<a id="md:auto-pipelining" class="tsd-anchor"></a><h3><a href="#md:auto-pipelining">Auto-Pipelining</a></h3><p>Node Redis will automatically pipeline requests that are made during the same &quot;tick&quot;.</p>
<pre><code class="language-typescript"><span class="hl-6">client</span><span class="hl-1">.</span><span class="hl-0">set</span><span class="hl-1">(</span><span class="hl-2">&quot;Tm9kZSBSZWRpcw==&quot;</span><span class="hl-1">, </span><span class="hl-2">&quot;users:1&quot;</span><span class="hl-1">);</span><br/><span class="hl-6">client</span><span class="hl-1">.</span><span class="hl-0">sAdd</span><span class="hl-1">(</span><span class="hl-2">&quot;users:1:tokens&quot;</span><span class="hl-1">, </span><span class="hl-2">&quot;Tm9kZSBSZWRpcw==&quot;</span><span class="hl-1">);</span>
</code><button>Copy</button></pre>
<p>Of course, if you don&#39;t do something with your Promises you&#39;re certain to
get <a href="https://nodejs.org/api/process.html#process_event_unhandledrejection">unhandled Promise exceptions</a>. To take
advantage of auto-pipelining and handle your Promises, use <code>Promise.all()</code>.</p>
<pre><code class="language-typescript"><span class="hl-5">await</span><span class="hl-1"> </span><span class="hl-9">Promise</span><span class="hl-1">.</span><span class="hl-0">all</span><span class="hl-1">([</span><br/><span class="hl-1"> </span><span class="hl-6">client</span><span class="hl-1">.</span><span class="hl-0">set</span><span class="hl-1">(</span><span class="hl-2">&quot;Tm9kZSBSZWRpcw==&quot;</span><span class="hl-1">, </span><span class="hl-2">&quot;users:1&quot;</span><span class="hl-1">),</span><br/><span class="hl-1"> </span><span class="hl-6">client</span><span class="hl-1">.</span><span class="hl-0">sAdd</span><span class="hl-1">(</span><span class="hl-2">&quot;users:1:tokens&quot;</span><span class="hl-1">, </span><span class="hl-2">&quot;Tm9kZSBSZWRpcw==&quot;</span><span class="hl-1">),</span><br/><span class="hl-1">]);</span>
</code><button>Copy</button></pre>
<a id="md:programmability" class="tsd-anchor"></a><h3><a href="#md:programmability">Programmability</a></h3><p>See the <a href="https://github.com/redis/node-redis/blob/master/docs/programmability.md">Programmability overview</a>.</p>
<a id="md:clustering" class="tsd-anchor"></a><h3><a href="#md:clustering">Clustering</a></h3><p>Check out the <a href="https://github.com/redis/node-redis/blob/master/docs/clustering.md">Clustering Guide</a> when using Node Redis to connect to a Redis Cluster.</p>
<a id="md:events" class="tsd-anchor"></a><h3><a href="#md:events">Events</a></h3><p>The Node Redis client class is an Nodejs EventEmitter and it emits an event each time the network status changes:</p>
<table>
<thead>
<tr>
<th>Name</th>
<th>When</th>
<th>Listener arguments</th>
</tr>
</thead>
<tbody><tr>
<td><code>connect</code></td>
<td>Initiating a connection to the server</td>
<td><em>No arguments</em></td>
</tr>
<tr>
<td><code>ready</code></td>
<td>Client is ready to use</td>
<td><em>No arguments</em></td>
</tr>
<tr>
<td><code>end</code></td>
<td>Connection has been closed (via <code>.disconnect()</code>)</td>
<td><em>No arguments</em></td>
</tr>
<tr>
<td><code>error</code></td>
<td>An error has occurred—usually a network issue such as &quot;Socket closed unexpectedly&quot;</td>
<td><code>(error: Error)</code></td>
</tr>
<tr>
<td><code>reconnecting</code></td>
<td>Client is trying to reconnect to the server</td>
<td><em>No arguments</em></td>
</tr>
<tr>
<td><code>sharded-channel-moved</code></td>
<td>See <a href="https://github.com/redis/node-redis/blob/master/docs/pub-sub.md#sharded-channel-moved-event">here</a></td>
<td>See <a href="https://github.com/redis/node-redis/blob/master/docs/pub-sub.md#sharded-channel-moved-event">here</a></td>
</tr>
</tbody></table>
<blockquote>
<p>:warning: You <strong>MUST</strong> listen to <code>error</code> events. If a client doesn&#39;t have at least one <code>error</code> listener registered and
an <code>error</code> occurs, that error will be thrown and the Node.js process will exit. See the <a href="https://nodejs.org/api/events.html#events_error_events"> &gt; <code>EventEmitter</code> docs</a> for more details.</p>
</blockquote>
<blockquote>
<p>The client will not emit <a href="https://github.com/redis/node-redis/blob/master/docs/v3-to-v4.md#all-the-removed-events">any other events</a> beyond those listed above.</p>
</blockquote>
<a id="md:supported-redis-versions" class="tsd-anchor"></a><h2><a href="#md:supported-redis-versions">Supported Redis versions</a></h2><p>Node Redis is supported with the following versions of Redis:</p>
<table>
<thead>
<tr>
<th>Version</th>
<th>Supported</th>
</tr>
</thead>
<tbody><tr>
<td>8.0.z</td>
<td>:heavy_check_mark:</td>
</tr>
<tr>
<td>7.4.z</td>
<td>:heavy_check_mark:</td>
</tr>
<tr>
<td>7.2.z</td>
<td>:heavy_check_mark:</td>
</tr>
<tr>
<td>&lt; 7.2</td>
<td>:x:</td>
</tr>
</tbody></table>
<blockquote>
<p>Node Redis should work with older versions of Redis, but it is not fully tested and we cannot offer support.</p>
</blockquote>
<a id="md:migration" class="tsd-anchor"></a><h2><a href="#md:migration">Migration</a></h2><ul>
<li><a href="https://github.com/redis/node-redis/blob/master/docs/v3-to-v4.md">From V3 to V4</a></li>
<li><a href="https://github.com/redis/node-redis/blob/master/docs/v4-to-v5.md">From V4 to V5</a></li>
<li><a href="https://github.com/redis/node-redis/blob/master/docs/v5.md">V5</a></li>
</ul>
<a id="md:contributing" class="tsd-anchor"></a><h2><a href="#md:contributing">Contributing</a></h2><p>If you&#39;d like to contribute, check out the <a href="https://github.com/redis/node-redis/blob/master/CONTRIBUTING.md">contributing guide</a>.</p>
<p>Thank you to all the people who already contributed to Node Redis!</p>
<p><a href="https://github.com/redis/node-redis/graphs/contributors"><img src="https://contrib.rocks/image?repo=redis/node-redis" alt="Contributors"></a></p>
<a id="md:license" class="tsd-anchor"></a><h2><a href="#md:license">License</a></h2><p>This repository is licensed under the &quot;MIT&quot; license. See <a href="https://github.com/redis/node-redis/blob/master/LICENSE">LICENSE</a>.</p>
</div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-index-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><h4 class="uppercase">Member Visibility</h4><form><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div><div class="tsd-theme-toggle"><h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-index-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><ul><li><ul><li><a href="#md:node-redis"><span>Node-<wbr/>Redis</span></a></li><li><ul><li><a href="#md:how-do-i-redis"><span>How do <wbr/>I <wbr/>Redis?</span></a></li><li><a href="#md:installation"><span>Installation</span></a></li><li><a href="#md:packages"><span>Packages</span></a></li><li><a href="#md:usage"><span>Usage</span></a></li><li><ul><li><a href="#md:basic-example"><span>Basic <wbr/>Example</span></a></li><li><a href="#md:redis-commands"><span>Redis <wbr/>Commands</span></a></li><li><a href="#md:unsupported-redis-commands"><span>Unsupported <wbr/>Redis <wbr/>Commands</span></a></li><li><a href="#md:transactions-multiexec"><span>Transactions (<wbr/>Multi/<wbr/>Exec)</span></a></li><li><a href="#md:blocking-commands"><span>Blocking <wbr/>Commands</span></a></li><li><a href="#md:pubsub"><span>Pub/<wbr/>Sub</span></a></li><li><a href="#md:scan-iterator"><span>Scan <wbr/>Iterator</span></a></li><li><a href="#md:disconnecting"><span>Disconnecting</span></a></li><li><a href="#md:client-side-caching"><span>Client <wbr/>Side <wbr/>Caching</span></a></li><li><a href="#md:auto-pipelining"><span>Auto-<wbr/>Pipelining</span></a></li><li><a href="#md:programmability"><span>Programmability</span></a></li><li><a href="#md:clustering"><span>Clustering</span></a></li><li><a href="#md:events"><span>Events</span></a></li></ul></li><li><a href="#md:supported-redis-versions"><span>Supported <wbr/>Redis versions</span></a></li><li><a href="#md:migration"><span>Migration</span></a></li><li><a href="#md:contributing"><span>Contributing</span></a></li><li><a href="#md:license"><span>License</span></a></li></ul></li></ul></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="modules.html" class="current"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1"></use></svg><span>redis-monorepo</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base="."></ul></nav></div></div></div><div class="tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><svg style="display: none"><g id="icon-1"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-module)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.162 16V7.24H10.578L11.514 10.072C11.602 10.328 11.674 10.584 11.73 10.84C11.794 11.088 11.842 11.28 11.874 11.416C11.906 11.28 11.954 11.088 12.018 10.84C12.082 10.584 12.154 10.324 12.234 10.06L13.122 7.24H14.538V16H13.482V12.82C13.482 12.468 13.49 12.068 13.506 11.62C13.53 11.172 13.558 10.716 13.59 10.252C13.622 9.78 13.654 9.332 13.686 8.908C13.726 8.476 13.762 8.1 13.794 7.78L12.366 12.16H11.334L9.894 7.78C9.934 8.092 9.97 8.456 10.002 8.872C10.042 9.28 10.078 9.716 10.11 10.18C10.142 10.636 10.166 11.092 10.182 11.548C10.206 12.004 10.218 12.428 10.218 12.82V16H9.162Z" fill="var(--color-text)"></path></g><g id="icon-2"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-module)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.162 16V7.24H10.578L11.514 10.072C11.602 10.328 11.674 10.584 11.73 10.84C11.794 11.088 11.842 11.28 11.874 11.416C11.906 11.28 11.954 11.088 12.018 10.84C12.082 10.584 12.154 10.324 12.234 10.06L13.122 7.24H14.538V16H13.482V12.82C13.482 12.468 13.49 12.068 13.506 11.62C13.53 11.172 13.558 10.716 13.59 10.252C13.622 9.78 13.654 9.332 13.686 8.908C13.726 8.476 13.762 8.1 13.794 7.78L12.366 12.16H11.334L9.894 7.78C9.934 8.092 9.97 8.456 10.002 8.872C10.042 9.28 10.078 9.716 10.11 10.18C10.142 10.636 10.166 11.092 10.182 11.548C10.206 12.004 10.218 12.428 10.218 12.82V16H9.162Z" fill="var(--color-text)"></path></g><g id="icon-4"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)"></path></g><g id="icon-8"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.45 16V7.24H14.49V8.224H10.518V10.936H14.07V11.908H10.518V15.016H14.49V16H9.45Z" fill="var(--color-text)"></path></g><g id="icon-16"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)"></path></g><g id="icon-32"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-variable)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.106 16L8.85 7.24H9.966L11.454 13.192C11.558 13.608 11.646 13.996 11.718 14.356C11.79 14.708 11.842 14.976 11.874 15.16C11.906 14.976 11.954 14.708 12.018 14.356C12.09 13.996 12.178 13.608 12.282 13.192L13.758 7.24H14.85L12.582 16H11.106Z" fill="var(--color-text)"></path></g><g id="icon-64"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.39 16V7.24H14.55V8.224H10.446V11.128H14.238V12.112H10.47V16H9.39Z" fill="var(--color-text)"></path></g><g id="icon-128"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)"></path></g><g id="icon-256"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)"></path></g><g id="icon-512"><rect fill="var(--color-icon-background)" stroke="#4D7FFF" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)"></path></g><g id="icon-1024"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)"></path></g><g id="icon-2048"><rect fill="var(--color-icon-background)" stroke="#FF4DB8" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.162 16V7.24H10.578L11.514 10.072C11.602 10.328 11.674 10.584 11.73 10.84C11.794 11.088 11.842 11.28 11.874 11.416C11.906 11.28 11.954 11.088 12.018 10.84C12.082 10.584 12.154 10.324 12.234 10.06L13.122 7.24H14.538V16H13.482V12.82C13.482 12.468 13.49 12.068 13.506 11.62C13.53 11.172 13.558 10.716 13.59 10.252C13.622 9.78 13.654 9.332 13.686 8.908C13.726 8.476 13.762 8.1 13.794 7.78L12.366 12.16H11.334L9.894 7.78C9.934 8.092 9.97 8.456 10.002 8.872C10.042 9.28 10.078 9.716 10.11 10.18C10.142 10.636 10.166 11.092 10.182 11.548C10.206 12.004 10.218 12.428 10.218 12.82V16H9.162Z" fill="var(--color-text)"></path></g><g id="icon-4096"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.39 16V7.24H14.55V8.224H10.446V11.128H14.238V12.112H10.47V16H9.39Z" fill="var(--color-text)"></path></g><g id="icon-8192"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)"></path></g><g id="icon-16384"><rect fill="var(--color-icon-background)" stroke="#4D7FFF" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)"></path></g><g id="icon-32768"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)"></path></g><g id="icon-65536"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)"></path></g><g id="icon-131072"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)"></path></g><g id="icon-262144"><rect fill="var(--color-icon-background)" stroke="#FF4D4D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M8.85 16L11.13 7.24H12.582L14.85 16H13.758L13.182 13.672H10.53L9.954 16H8.85ZM10.746 12.76H12.954L12.282 10.06C12.154 9.548 12.054 9.12 11.982 8.776C11.91 8.432 11.866 8.208 11.85 8.104C11.834 8.208 11.79 8.432 11.718 8.776C11.646 9.12 11.546 9.544 11.418 10.048L10.746 12.76Z" fill="var(--color-text)"></path></g><g id="icon-524288"><rect fill="var(--color-icon-background)" stroke="#FF4D4D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M8.85 16L11.13 7.24H12.582L14.85 16H13.758L13.182 13.672H10.53L9.954 16H8.85ZM10.746 12.76H12.954L12.282 10.06C12.154 9.548 12.054 9.12 11.982 8.776C11.91 8.432 11.866 8.208 11.85 8.104C11.834 8.208 11.79 8.432 11.718 8.776C11.646 9.12 11.546 9.544 11.418 10.048L10.746 12.76Z" fill="var(--color-text)"></path></g><g id="icon-1048576"><rect fill="var(--color-icon-background)" stroke="#FF4D4D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M8.85 16L11.13 7.24H12.582L14.85 16H13.758L13.182 13.672H10.53L9.954 16H8.85ZM10.746 12.76H12.954L12.282 10.06C12.154 9.548 12.054 9.12 11.982 8.776C11.91 8.432 11.866 8.208 11.85 8.104C11.834 8.208 11.79 8.432 11.718 8.776C11.646 9.12 11.546 9.544 11.418 10.048L10.746 12.76Z" fill="var(--color-text)"></path></g><g id="icon-2097152"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)"></path></g><g id="icon-4194304"><rect fill="var(--color-icon-background)" stroke="#FF4D82" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M10.354 17V8.24H13.066C13.586 8.24 14.042 8.348 14.434 8.564C14.826 8.772 15.13 9.064 15.346 9.44C15.562 9.816 15.67 10.256 15.67 10.76C15.67 11.352 15.514 11.86 15.202 12.284C14.898 12.708 14.482 13 13.954 13.16L15.79 17H14.518L12.838 13.28H11.434V17H10.354ZM11.434 12.308H13.066C13.514 12.308 13.874 12.168 14.146 11.888C14.418 11.6 14.554 11.224 14.554 10.76C14.554 10.288 14.418 9.912 14.146 9.632C13.874 9.352 13.514 9.212 13.066 9.212H11.434V12.308Z" fill="var(--color-text)"></path></g><g id="icon-chevronDown"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></g><g id="icon-chevronSmall"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-text)"></path></g><g id="icon-menu"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></g><g id="icon-search"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></g><g id="icon-anchor"><g stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></g></g></svg></body></html>