Deploying to gh-pages from @ harttle/liquidjs@afec88b04c 🚀

This commit is contained in:
harttle
2026-06-23 09:40:16 +00:00
parent 0ca57b4fd0
commit 1066f66eb3
147 changed files with 1084 additions and 925 deletions
+23 -23
View File
@@ -1,30 +1,30 @@
:root { :root {
--light-hl-0: #795E26; --light-hl-0: #AF00DB;
--dark-hl-0: #DCDCAA; --dark-hl-0: #C586C0;
--light-hl-1: #000000; --light-hl-1: #000000;
--dark-hl-1: #D4D4D4; --dark-hl-1: #D4D4D4;
--light-hl-2: #A31515; --light-hl-2: #001080;
--dark-hl-2: #CE9178; --dark-hl-2: #9CDCFE;
--light-hl-3: #800000; --light-hl-3: #A31515;
--dark-hl-3: #808080; --dark-hl-3: #CE9178;
--light-hl-4: #800000; --light-hl-4: #0000FF;
--dark-hl-4: #569CD6; --dark-hl-4: #569CD6;
--light-hl-5: #000000FF; --light-hl-5: #0070C1;
--dark-hl-5: #D4D4D4; --dark-hl-5: #4FC1FF;
--light-hl-6: #E50000; --light-hl-6: #795E26;
--dark-hl-6: #9CDCFE; --dark-hl-6: #DCDCAA;
--light-hl-7: #0000FF; --light-hl-7: #008000;
--dark-hl-7: #CE9178; --dark-hl-7: #6A9955;
--light-hl-8: #0000FF; --light-hl-8: #800000;
--dark-hl-8: #569CD6; --dark-hl-8: #808080;
--light-hl-9: #AF00DB; --light-hl-9: #800000;
--dark-hl-9: #C586C0; --dark-hl-9: #569CD6;
--light-hl-10: #001080; --light-hl-10: #000000FF;
--dark-hl-10: #9CDCFE; --dark-hl-10: #D4D4D4;
--light-hl-11: #0070C1; --light-hl-11: #E50000;
--dark-hl-11: #4FC1FF; --dark-hl-11: #9CDCFE;
--light-hl-12: #008000; --light-hl-12: #0000FF;
--dark-hl-12: #6A9955; --dark-hl-12: #CE9178;
--light-hl-13: #098658; --light-hl-13: #098658;
--dark-hl-13: #B5CEA8; --dark-hl-13: #B5CEA8;
--light-hl-14: #EE0000; --light-hl-14: #EE0000;
+47 -42
View File
@@ -1,53 +1,57 @@
<!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>liquidjs</title><meta name="description" content="Documentation for liquidjs"/><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/icons.js" id="tsd-icons-script"></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";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</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="assets/icons.svg#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">liquidjs</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="assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><h2>liquidjs</h2></div><div class="tsd-panel tsd-typography"><a id="md:liquidjs" class="tsd-anchor"></a><h1 class="tsd-anchor-link">liquidjs<a href="#md:liquidjs" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h1><p><a href="https://www.npmjs.org/package/liquidjs"><img src="https://img.shields.io/npm/v/liquidjs.svg?logo=npm&amp;style=flat-square" alt="npm version"></a> <!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>liquidjs</title><meta name="description" content="Documentation for liquidjs"/><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/icons.js" id="tsd-icons-script"></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";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</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="assets/icons.svg#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">liquidjs</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="assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><h2>liquidjs</h2></div><div class="tsd-panel tsd-typography"><a id="md:liquidjs" class="tsd-anchor"></a><h1 class="tsd-anchor-link">LiquidJS<a href="#md:liquidjs" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h1><p>A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.</p>
<p><a href="https://www.npmjs.org/package/liquidjs"><img src="https://img.shields.io/npm/v/liquidjs.svg?logo=npm&amp;style=flat-square" alt="npm version"></a>
<a href="https://www.npmjs.org/package/liquidjs"><img src="https://img.shields.io/npm/dm/liquidjs.svg?style=flat-square" alt="npm downloads"></a> <a href="https://www.npmjs.org/package/liquidjs"><img src="https://img.shields.io/npm/dm/liquidjs.svg?style=flat-square" alt="npm downloads"></a>
<a href="https://coveralls.io/github/harttle/liquidjs?branch=master"><img src="https://img.shields.io/coveralls/harttle/liquidjs.svg?style=flat-square" alt="Coverage"></a>
<a href="https://github.com/harttle/liquidjs/actions/workflows/ci-build.yml?query=branch%3Amaster"><img src="https://img.shields.io/github/actions/workflow/status/harttle/liquidjs/ci-build.yml?branch=master&amp;style=flat-square" alt="Build Status"></a> <a href="https://github.com/harttle/liquidjs/actions/workflows/ci-build.yml?query=branch%3Amaster"><img src="https://img.shields.io/github/actions/workflow/status/harttle/liquidjs/ci-build.yml?branch=master&amp;style=flat-square" alt="Build Status"></a>
<a href="https://github.com/harttle/liquidjs/blob/master/LICENSE"><img src="https://img.shields.io/dub/l/vibe-d.svg?style=flat-square" alt="DUB license"></a> <a href="https://coveralls.io/github/harttle/liquidjs?branch=master"><img src="https://img.shields.io/coveralls/harttle/liquidjs.svg?style=flat-square" alt="Coverage"></a>
<a href="https://github.com/harttle/liquidjs"><img src="https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square" alt="semantic-release"></a></p> <a href="https://github.com/harttle/liquidjs/blob/master/LICENSE"><img src="https://img.shields.io/github/license/harttle/liquidjs?style=flat-square" alt="License: MIT"></a></p>
<p>A simple, expressive and safe <a href="https://shopify.github.io/liquid/">Shopify</a> / GitHub Pages compatible template engine in pure JavaScript. <p><a href="https://liquidjs.com">Documentation</a> · <a href="https://liquidjs.com/playground.html">Playground</a> · <a href="https://liquidjs.com/tutorials/setup.html">Setup guide</a> · <a href="https://liquidjs.com/tutorials/contribution-guidelines.html">Contributing</a></p>
<strong>The purpose of this repo</strong> is to provide a standard Liquid implementation for the JavaScript community so that <a href="https://jekyllrb.com">Jekyll sites</a>, <a href="https://pages.github.com/">GitHub Pages</a> and <a href="https://themes.shopify.com/">Shopify templates</a> can be ported to Node.js without pain.</p> <a href="https://liquidjs.com/playground.html">
<ul> <img src="media/playground-demo.gif" alt="LiquidJS playground: edit a template and context, see live HTML output" width="980" style="display: block; margin: 0 auto;" />
<li><a href="https://liquidjs.com">Documentation</a></li> </a>
<li>Please star <a href="https://github.com/harttle/liquidjs">LiquidJS on GitHub</a>!</li> <p align="center"><sub>Try the <a href="https://liquidjs.com/playground.html">online playground</a>.</sub></p>
<li>Financial support via <a href="https://github.com/sponsors/harttle">GitHub Sponsors</a>.</li> <a id="md:quick-start" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Quick start<a href="#md:quick-start" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Liquid</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">&#39;liquidjs&#39;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">engine</span><span class="hl-1"> = </span><span class="hl-4">new</span><span class="hl-1"> </span><span class="hl-6">Liquid</span><span class="hl-1">()</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">html</span><span class="hl-1"> = </span><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-2">engine</span><span class="hl-1">.</span><span class="hl-6">parseAndRender</span><span class="hl-1">(</span><br/><span class="hl-1"> </span><span class="hl-3">&#39;Hello, {{ name | capitalize }}!&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> { </span><span class="hl-2">name:</span><span class="hl-1"> </span><span class="hl-3">&#39;liquid&#39;</span><span class="hl-1"> }</span><br/><span class="hl-1">)</span><br/><span class="hl-7">//=&gt; &#39;Hello, Liquid!&#39;</span>
</ul>
<p align="center"><a href="https://liquidjs.com"><img height="155px" width="155px" src="https://liquidjs.com/icon/mstile-310x310.png" alt="logo"></a></p>
<a id="md:whats-it-like" class="tsd-anchor"></a><h2 class="tsd-anchor-link">What's it like?<a href="#md:whats-it-like" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><p>Basically there're two types of Liquid syntax: tags enclosed by <code>{% %}</code> and outputs enclosed by <code>{{ }}</code>. A Liquid template looks like:</p>
<pre><code class="liquid">{% if username %}
{{ username | append: ", welcome to LiquidJS!" | capitalize }}
{% endif %}
</code><button type="button">Copy</button></pre> </code><button type="button">Copy</button></pre>
<p><a href="https://liquidjs.com/playground.html">A live demo</a> is also available and here's a <a href="https://liquidjs.com/tutorials/intro-to-liquid.html">quick tutorial</a> for Liquid syntax.</p> <a id="md:installation" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Installation<a href="#md:installation" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><p><strong>Node.js</strong></p>
<a id="md:installation" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Installation<a href="#md:installation" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><p>Install from npm in Node.js:</p> <pre><code class="bash"><span class="hl-6">npm</span><span class="hl-1"> </span><span class="hl-3">install</span><span class="hl-1"> </span><span class="hl-3">liquidjs</span>
<pre><code class="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">liquidjs</span>
</code><button type="button">Copy</button></pre> </code><button type="button">Copy</button></pre>
<p>Or use the UMD bundle from jsDelivr:</p> <p><strong>Browser</strong> (jsDelivr UMD bundle)</p>
<pre><code class="html"><span class="hl-3">&lt;</span><span class="hl-4">script</span><span class="hl-5"> </span><span class="hl-6">src</span><span class="hl-5">=</span><span class="hl-7">&quot;https://cdn.jsdelivr.net/npm/liquidjs/dist/liquid.browser.min.js&quot;</span><span class="hl-3">&gt;&lt;/</span><span class="hl-4">script</span><span class="hl-3">&gt;</span> <pre><code class="html"><span class="hl-8">&lt;</span><span class="hl-9">script</span><span class="hl-10"> </span><span class="hl-11">src</span><span class="hl-10">=</span><span class="hl-12">&quot;https://cdn.jsdelivr.net/npm/liquidjs/dist/liquid.browser.min.js&quot;</span><span class="hl-8">&gt;&lt;/</span><span class="hl-9">script</span><span class="hl-8">&gt;</span>
</code><button type="button">Copy</button></pre> </code><button type="button">Copy</button></pre>
<p>Or render directly from CLI using npx:</p> <p><strong>CLI</strong></p>
<pre><code class="bash"><span class="hl-0">npx</span><span class="hl-1"> </span><span class="hl-2">liquidjs</span><span class="hl-1"> </span><span class="hl-8">--template</span><span class="hl-1"> </span><span class="hl-2">&#39;Hello, {{ name }}!&#39;</span><span class="hl-1"> </span><span class="hl-8">--context</span><span class="hl-1"> </span><span class="hl-2">&#39;{&quot;name&quot;: &quot;Snake&quot;}&#39;</span> <pre><code class="bash"><span class="hl-6">npx</span><span class="hl-1"> </span><span class="hl-3">liquidjs</span><span class="hl-1"> </span><span class="hl-4">--template</span><span class="hl-1"> </span><span class="hl-3">&#39;Hello, {{ name }}!&#39;</span><span class="hl-1"> </span><span class="hl-4">--context</span><span class="hl-1"> </span><span class="hl-3">&#39;{&quot;name&quot;: &quot;Liquid&quot;}&#39;</span>
</code><button type="button">Copy</button></pre> </code><button type="button">Copy</button></pre>
<p>For more details, refer to the <a href="https://liquidjs.com/tutorials/setup.html">Setup Guide</a>.</p> <p>See the <a href="https://liquidjs.com/tutorials/setup.html">setup guide</a> for partials, layouts, caching, and other options.</p>
<a id="md:whos-using-liquidjs" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Who's Using LiquidJS?<a href="#md:whos-using-liquidjs" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><ul> <a id="md:used-by" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Used by<a href="#md:used-by" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><!-- USED-BY-BEGIN -->
<li><a href="https://www.11ty.dev/">Eleventy</a>: Eleventy, a simpler static site generator.</li> <p align="center" style="line-height: 2.5;">
<li><a href="https://github.com/github/docs">Github Docs</a>: The open-source repo for <a href="http://docs.github.com">docs.github.com</a>.</li> <a href="https://www.11ty.dev/" style="display: inline-block; vertical-align: middle; margin: 8px;"><img src="https://avatars.githubusercontent.com/u/35147177?v=4&s=100" height="80" style="vertical-align: middle;" alt="Eleventy" title="Eleventy"/></a>
<li><a href="https://github.com/elastic/kibana">Kibana</a>: Elastic's analytics and visualization platform for Elasticsearch; workflow features use LiquidJS for Liquid templates.</li> <a href="https://www.opensense.com/" style="display: inline-block; vertical-align: middle; margin: 8px;"><img src="https://images.opencollective.com/opensense-inc/bf840ae/logo/256.png?height=100" height="80" style="vertical-align: middle;" alt="Opensense" title="Opensense"/></a>
<li><a href="https://www.opensense.com/">Opensense</a>: The smarter way to send email.</li> <a href="https://www.microsoft.com/" style="display: inline-block; vertical-align: middle; margin: 8px;"><img src="https://avatars.githubusercontent.com/u/6154722?v=4&s=100" height="80" style="vertical-align: middle;" alt="Power Pages, Azure API Management developer portal" title="Power Pages, Azure API Management developer portal"/></a>
<li><a href="https://docs.directus.io/">Directus</a>: an instant REST+GraphQL API and intuitive no-code data collaboration app for any SQL database.</li> <a href="https://docs.github.com/" style="display: inline-block; vertical-align: middle; margin: 8px;"><img src="https://avatars.githubusercontent.com/u/9919?v=4&amp;s=100" height="80" style="vertical-align: middle;" alt="GitHub Docs" title="GitHub Docs"/></a>
<li><a href="https://www.rockrms.com/">Rock</a>: An open source CMS, Relationship Management System (RMS) and Church Management System (ChMS) all rolled into one.</li> <a href="https://github.com/elastic/kibana" style="display: inline-block; vertical-align: middle; margin: 8px;"><img src="https://avatars.githubusercontent.com/u/6764390?v=4&s=100" height="80" style="vertical-align: middle;" alt="Kibana" title="Kibana"/></a>
<li><a href="https://github.com/BuilderIO/mitosis">Mitosis</a>: Write components once, run everywhere. Compiles to React, Vue, Qwik, Solid, Angular, Svelte, and more.</li> <a href="https://www.shopify.com/" style="display: inline-block; vertical-align: middle; margin: 8px;"><img src="https://avatars.githubusercontent.com/u/8085?v=4&amp;s=100" height="80" style="vertical-align: middle;" alt="Shopify CLI, Checkout Blocks" title="Shopify CLI, Checkout Blocks"/></a>
<li><a href="https://patternlab.io/">Pattern Lab</a>: a frontend workshop environment that helps you build, view, test, and showcase your design system's UI components.</li> <a href="https://customer.io/" style="display: inline-block; vertical-align: middle; margin: 8px;"><img src="https://avatars.githubusercontent.com/u/1152079?v=4&s=100" height="80" style="vertical-align: middle;" alt="Customer IO" title="Customer IO"/></a>
<li><a href="https://www.builder.io/m/developers">Builder.io</a>: the first and only headless CMS with a visual editor that lets you drag and drop with your components, directly within your current site or app. Completely API-driven, for cleaner code and simpler workflows.</li> <br/>
<li><a href="https://learn.microsoft.com/en-us/power-pages/introduction">Microsoft Power Pages</a>: a secure, enterprise-grade, low-code software as a service (SaaS) platform for creating, hosting, and administering modern external-facing business websites.</li> <a href="https://syntax.fm/" style="display: inline-block; vertical-align: middle; margin: 8px;"><img src="https://avatars.githubusercontent.com/u/130389858?v=4&s=100" height="80" style="vertical-align: middle;" alt="Syntax Podcast" title="Syntax Podcast"/></a>
<li><a href="https://learn.microsoft.com/en-us/azure/api-management/api-management-howto-developer-portal">Azure API Management developer portal</a>: an automatically generated, fully customizable website with the documentation of your APIs.</li> <a href="https://www.testmuai.com/?utm_medium=sponsor&utm_source=liquidjs" style="display: inline-block; vertical-align: middle; margin: 8px;"><img src="https://avatars.githubusercontent.com/u/27130435?s=200&v=4" width="80" style="vertical-align: middle;" alt="TestMu AI" title="TestMu AI"/></a>
<li><a href="https://wismolabs.com/">WISMOlabs</a>: Post Purchase Experience platform for eCommerce retailers enhancing customer satisfaction by using LiquidJS to provide customizable post-purchase experiences through programmable email, SMS, order tracking pages, and webhooks.</li> <a href="https://chudovo.com/" style="display: inline-block; vertical-align: middle; margin: 8px;"><img src="https://images.opencollective.com/Chudovo/avatar/256.png?height=100" width="160" style="vertical-align: middle;background: white;padding: 8px 16px;" alt="Chudovo" title="Chudovo"/></a>
<li><a href="https://chromewebstore.google.com/detail/freshet/mpclplhdencffbilobpcapccnihpelcg">Freshet</a>: <em>JSON in, page out</em> — a Chrome extension that uses LiquidJS templates per URL pattern, so the JSON becomes a rendered, useful page.</li> <a href="https://www.pakstyle.pk/" style="display: inline-block; vertical-align: middle; margin: 8px;"><img src="https://images.opencollective.com/pakstyle/2b81605/logo/256.png?height=100" height="80" style="vertical-align: middle;" alt="PakStyle.pk" title="PakStyle.pk"/></a>
</ul> <a href="https://www.escorta.com/" style="display: inline-block; vertical-align: middle; margin: 8px;"><img src="https://images.opencollective.com/escortacom/avatar/256.png?height=100" height="45" style="vertical-align: middle;" alt="EscortA.com" title="EscortA.com"/></a>
<p>Feel free to create a PR or contact me to add your use case into this list!</p> <a href="https://opencollective.com/touchless" style="display: inline-block; vertical-align: middle; margin: 8px;"><img src="https://images.opencollective.com/touchless/273bc74/logo/256.png?height=100" height="80" style="vertical-align: middle;" alt="Touchless" title="Touchless"/></a>
<br/>
<a href="https://www.dropkiq.com/" style="display: inline-block; vertical-align: middle; margin: 8px;"><img src="https://images.opencollective.com/1bertlol/43a8ea8/logo/256.png?height=100" height="80" style="vertical-align: middle;" alt="Dropkiq" title="Dropkiq"/></a>
<a href="https://directus.io/" style="display: inline-block; vertical-align: middle; margin: 8px;"><img src="https://avatars.githubusercontent.com/u/15967950?v=4&amp;s=100" height="80" style="vertical-align: middle;" alt="Directus" title="Directus"/></a>
<a href="https://www.builder.io/" style="display: inline-block; vertical-align: middle; margin: 8px;"><img src="https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F51a002f4a17f4fc4a829b8891a1c25ee" height="80" style="vertical-align: middle;" alt="Builder.io, Mitosis" title="Builder.io, Mitosis"/></a>
<a href="https://patternlab.io/" style="display: inline-block; vertical-align: middle; margin: 8px;"><img src="https://avatars.githubusercontent.com/u/4733935?v=4&amp;s=100" height="80" style="vertical-align: middle;" alt="Pattern Lab" title="Pattern Lab"/></a>
<a href="https://www.rockrms.com/" style="display: inline-block; vertical-align: middle; margin: 8px;"><img src="https://www.rockrms.com/GetImage.ashx?id=72533" height="80" style="vertical-align: middle;" alt="Rock RMS" title="Rock RMS"/></a>
<a href="https://wismolabs.com/" style="display: inline-block; vertical-align: middle; margin: 8px;"><img src="https://cdn-ldlap.nitrocdn.com/DsLJMZpUUekfsitqBnNmsRAnzbwPoIzE/assets/images/optimized/rev-5df8687/wismolabs.com/wp-content/uploads/2023/03/favicon-300x300.png" height="80" style="vertical-align: middle;" alt="WISMOlabs" title="WISMOlabs"/></a>
<a href="https://chromewebstore.google.com/detail/freshet/mpclplhdencffbilobpcapccnihpelcg" style="display: inline-block; vertical-align: middle; margin: 8px;"><img src="https://raw.githubusercontent.com/MattAltermatt/freshet/main/public/icon-128.png" height="80" style="vertical-align: middle;" alt="Freshet" title="Freshet"/></a>
</p>
<!-- USED-BY-END -->
<p>Products and projects running on LiquidJS. <a href="https://github.com/harttle/liquidjs/edit/master/README.md">Open a PR</a> to add yours.</p>
<a id="md:financial-support" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Financial Support<a href="#md:financial-support" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><p>If you personally love LiquidJS or it's benefiting your business, please consider financially support us via <a href="https://github.com/sponsors/harttle">GitHub Sponsors</a>. Special thanks to our sponsors!</p> <a id="md:financial-support" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Financial Support<a href="#md:financial-support" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><p>If you personally love LiquidJS or it's benefiting your business, please consider financially support us via <a href="https://github.com/sponsors/harttle">GitHub Sponsors</a>. Special thanks to our sponsors!</p>
<!-- FINANCIAL-CONTRIBUTORS-BEGIN --> <!-- FINANCIAL-CONTRIBUTORS-BEGIN -->
<p align="center" style="line-height: 2.5;"> <p align="center" style="line-height: 2.5;">
@@ -55,7 +59,7 @@
<a href="https://www.opensense.com/" style="display: inline-block; vertical-align: middle; margin: 8px;"><img src="https://images.opencollective.com/opensense-inc/bf840ae/logo/256.png?height=100" height="80" style="vertical-align: middle;" alt="Opensense Inc." title="Opensense"/></a> <a href="https://www.opensense.com/" style="display: inline-block; vertical-align: middle; margin: 8px;"><img src="https://images.opencollective.com/opensense-inc/bf840ae/logo/256.png?height=100" height="80" style="vertical-align: middle;" alt="Opensense Inc." title="Opensense"/></a>
<a href="https://github.com/microsoft" style="display: inline-block; vertical-align: middle; margin: 8px;"><img src="https://avatars.githubusercontent.com/u/6154722?v=4&s=100" height="80" style="vertical-align: middle;" alt="Microsoft" title="Microsoft"/></a> <a href="https://github.com/microsoft" style="display: inline-block; vertical-align: middle; margin: 8px;"><img src="https://avatars.githubusercontent.com/u/6154722?v=4&s=100" height="80" style="vertical-align: middle;" alt="Microsoft" title="Microsoft"/></a>
<a href="https://sentry.io/" style="display: inline-block; vertical-align: middle; margin: 8px;"><img src="https://avatars.githubusercontent.com/u/1396951?v=4&s=100" height="80" style="vertical-align: middle;" alt="Sentry" title="Sentry"/></a> <a href="https://sentry.io/" style="display: inline-block; vertical-align: middle; margin: 8px;"><img src="https://avatars.githubusercontent.com/u/1396951?v=4&s=100" height="80" style="vertical-align: middle;" alt="Sentry" title="Sentry"/></a>
<a href="https://www.checkoutblocks.com/" style="display: inline-block; vertical-align: middle; margin: 8px;"><img src="https://avatars.githubusercontent.com/u/114603307?v=4&s=100" height="80" style="vertical-align: middle;" alt="Checkout Blocks" title="Checkout Blocks"/></a> <a href="https://github.com/Checkout-Blocks" style="display: inline-block; vertical-align: middle; margin: 8px;"><img src="https://avatars.githubusercontent.com/u/114603307?v=4&s=100" height="80" style="vertical-align: middle;" alt="Checkout Blocks" title="Checkout Blocks"/></a>
<a href="https://customer.io/" style="display: inline-block; vertical-align: middle; margin: 8px;"><img src="https://avatars.githubusercontent.com/u/1152079?v=4&s=100" height="80" style="vertical-align: middle;" alt="Customer IO" title="Customer IO"/></a> <a href="https://customer.io/" style="display: inline-block; vertical-align: middle; margin: 8px;"><img src="https://avatars.githubusercontent.com/u/1152079?v=4&s=100" height="80" style="vertical-align: middle;" alt="Customer IO" title="Customer IO"/></a>
<a href="https://syntax.fm/" style="display: inline-block; vertical-align: middle; margin: 8px;"><img src="https://avatars.githubusercontent.com/u/130389858?v=4&s=100" height="80" style="vertical-align: middle;" alt="Syntax Podcast" title="Syntax Podcast"/></a> <a href="https://syntax.fm/" style="display: inline-block; vertical-align: middle; margin: 8px;"><img src="https://avatars.githubusercontent.com/u/130389858?v=4&s=100" height="80" style="vertical-align: middle;" alt="Syntax Podcast" title="Syntax Podcast"/></a>
<br/> <br/>
@@ -204,4 +208,5 @@
<!-- markdownlint-restore --> <!-- markdownlint-restore -->
<!-- prettier-ignore-end --> <!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END --> <!-- ALL-CONTRIBUTORS-LIST:END -->
</div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><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-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></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><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-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#md:liquidjs"><span>liquidjs</span></a><ul><li><a href="#md:whats-it-like"><span>What&#39;s it like?</span></a></li><li><a href="#md:installation"><span>Installation</span></a></li><li><a href="#md:whos-using-liquidjs"><span>Who&#39;s <wbr/>Using <wbr/>LiquidJS?</span></a></li><li><a href="#md:financial-support"><span>Financial <wbr/>Support</span></a></li><li><a href="#md:contributors-✨"><span>Contributors ✨</span></a></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="assets/icons.svg#icon-1"></use></svg><span>liquidjs</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base="."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html> <a id="md:license" class="tsd-anchor"></a><h2 class="tsd-anchor-link">License<a href="#md:license" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><p><a href="media/LICENSE">MIT</a> © <a href="https://github.com/harttle">Jun Yang</a></p>
</div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><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-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></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><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-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#md:liquidjs"><span>LiquidJS</span></a><ul><li><a href="#md:quick-start"><span>Quick start</span></a></li><li><a href="#md:installation"><span>Installation</span></a></li><li><a href="#md:used-by"><span>Used by</span></a></li><li><a href="#md:financial-support"><span>Financial <wbr/>Support</span></a></li><li><a href="#md:contributors-✨"><span>Contributors ✨</span></a></li><li><a href="#md:license"><span>License</span></a></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="assets/icons.svg#icon-1"></use></svg><span>liquidjs</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base="."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
File diff suppressed because one or more lines are too long
@@ -38,17 +38,17 @@ the given {ArrayBuffer}/{SharedArrayBuffer}.</p>
for pooling. This value may be modified.</p> for pooling. This value may be modified.</p>
</div><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since" class="tsd-anchor"></a>Since<a href="#Since" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.11.3</p> </div><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since" class="tsd-anchor"></a>Since<a href="#Since" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.11.3</p>
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:641</li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member tsd-is-external"><a id="alloc" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>alloc</span><a href="#alloc" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="alloc.alloc-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">alloc</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">size</span>, <span class="tsd-kind-parameter">fill</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">encoding</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a><a href="#alloc.alloc-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Allocates a new <code>Buffer</code> of <code>size</code> bytes. If <code>fill</code> is <code>undefined</code>, the<code>Buffer</code> will be zero-filled.</p> </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:641</li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member tsd-is-external"><a id="alloc" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>alloc</span><a href="#alloc" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="alloc.alloc-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">alloc</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">size</span>, <span class="tsd-kind-parameter">fill</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">encoding</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a><a href="#alloc.alloc-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Allocates a new <code>Buffer</code> of <code>size</code> bytes. If <code>fill</code> is <code>undefined</code>, the<code>Buffer</code> will be zero-filled.</p>
<pre><code class="js"><span class="hl-9">import</span><span class="hl-1"> { </span><span class="hl-10">Buffer</span><span class="hl-1"> } </span><span class="hl-9">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-8">const</span><span class="hl-1"> </span><span class="hl-11">buf</span><span class="hl-1"> = </span><span class="hl-10">Buffer</span><span class="hl-1">.</span><span class="hl-0">alloc</span><span class="hl-1">(</span><span class="hl-13">5</span><span class="hl-1">);</span><br/><br/><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-10">buf</span><span class="hl-1">);</span><br/><span class="hl-12">// Prints: &lt;Buffer 00 00 00 00 00&gt;</span> <pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">alloc</span><span class="hl-1">(</span><span class="hl-13">5</span><span class="hl-1">);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">);</span><br/><span class="hl-7">// Prints: &lt;Buffer 00 00 00 00 00&gt;</span>
</code><button type="button">Copy</button></pre> </code><button type="button">Copy</button></pre>
<p>If <code>size</code> is larger than constants.MAX_LENGTH or smaller than 0, <code>ERR_OUT_OF_RANGE</code> is thrown.</p> <p>If <code>size</code> is larger than constants.MAX_LENGTH or smaller than 0, <code>ERR_OUT_OF_RANGE</code> is thrown.</p>
<p>If <code>fill</code> is specified, the allocated <code>Buffer</code> will be initialized by calling <code>buf.fill(fill)</code>.</p> <p>If <code>fill</code> is specified, the allocated <code>Buffer</code> will be initialized by calling <code>buf.fill(fill)</code>.</p>
<pre><code class="js"><span class="hl-9">import</span><span class="hl-1"> { </span><span class="hl-10">Buffer</span><span class="hl-1"> } </span><span class="hl-9">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-8">const</span><span class="hl-1"> </span><span class="hl-11">buf</span><span class="hl-1"> = </span><span class="hl-10">Buffer</span><span class="hl-1">.</span><span class="hl-0">alloc</span><span class="hl-1">(</span><span class="hl-13">5</span><span class="hl-1">, </span><span class="hl-2">&#39;a&#39;</span><span class="hl-1">);</span><br/><br/><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-10">buf</span><span class="hl-1">);</span><br/><span class="hl-12">// Prints: &lt;Buffer 61 61 61 61 61&gt;</span> <pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">alloc</span><span class="hl-1">(</span><span class="hl-13">5</span><span class="hl-1">, </span><span class="hl-3">&#39;a&#39;</span><span class="hl-1">);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">);</span><br/><span class="hl-7">// Prints: &lt;Buffer 61 61 61 61 61&gt;</span>
</code><button type="button">Copy</button></pre> </code><button type="button">Copy</button></pre>
<p>If both <code>fill</code> and <code>encoding</code> are specified, the allocated <code>Buffer</code> will be <p>If both <code>fill</code> and <code>encoding</code> are specified, the allocated <code>Buffer</code> will be
initialized by calling <code>buf.fill(fill, encoding)</code>.</p> initialized by calling <code>buf.fill(fill, encoding)</code>.</p>
<pre><code class="js"><span class="hl-9">import</span><span class="hl-1"> { </span><span class="hl-10">Buffer</span><span class="hl-1"> } </span><span class="hl-9">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-8">const</span><span class="hl-1"> </span><span class="hl-11">buf</span><span class="hl-1"> = </span><span class="hl-10">Buffer</span><span class="hl-1">.</span><span class="hl-0">alloc</span><span class="hl-1">(</span><span class="hl-13">11</span><span class="hl-1">, </span><span class="hl-2">&#39;aGVsbG8gd29ybGQ=&#39;</span><span class="hl-1">, </span><span class="hl-2">&#39;base64&#39;</span><span class="hl-1">);</span><br/><br/><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-10">buf</span><span class="hl-1">);</span><br/><span class="hl-12">// Prints: &lt;Buffer 68 65 6c 6c 6f 20 77 6f 72 6c 64&gt;</span> <pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">alloc</span><span class="hl-1">(</span><span class="hl-13">11</span><span class="hl-1">, </span><span class="hl-3">&#39;aGVsbG8gd29ybGQ=&#39;</span><span class="hl-1">, </span><span class="hl-3">&#39;base64&#39;</span><span class="hl-1">);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">);</span><br/><span class="hl-7">// Prints: &lt;Buffer 68 65 6c 6c 6f 20 77 6f 72 6c 64&gt;</span>
</code><button type="button">Copy</button></pre> </code><button type="button">Copy</button></pre>
<p>Calling <code>Buffer.alloc()</code> can be measurably slower than the alternative <code>Buffer.allocUnsafe()</code> but ensures that the newly created <code>Buffer</code> instance <p>Calling <code>Buffer.alloc()</code> can be measurably slower than the alternative <code>Buffer.allocUnsafe()</code> but ensures that the newly created <code>Buffer</code> instance
@@ -62,7 +62,7 @@ data that might not have been allocated for <code>Buffer</code>s.</p>
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:554</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="allocUnsafe" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>alloc<wbr/>Unsafe</span><a href="#allocUnsafe" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="allocUnsafe.allocUnsafe-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">alloc<wbr/>Unsafe</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">size</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a><a href="#allocUnsafe.allocUnsafe-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Allocates a new <code>Buffer</code> of <code>size</code> bytes. If <code>size</code> is larger than constants.MAX_LENGTH or smaller than 0, <code>ERR_OUT_OF_RANGE</code> is thrown.</p> </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:554</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="allocUnsafe" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>alloc<wbr/>Unsafe</span><a href="#allocUnsafe" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="allocUnsafe.allocUnsafe-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">alloc<wbr/>Unsafe</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">size</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a><a href="#allocUnsafe.allocUnsafe-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Allocates a new <code>Buffer</code> of <code>size</code> bytes. If <code>size</code> is larger than constants.MAX_LENGTH or smaller than 0, <code>ERR_OUT_OF_RANGE</code> is thrown.</p>
<p>The underlying memory for <code>Buffer</code> instances created in this way is <em>not</em> <p>The underlying memory for <code>Buffer</code> instances created in this way is <em>not</em>
<em>initialized</em>. The contents of the newly created <code>Buffer</code> are unknown and <em>may contain sensitive data</em>. Use <code>Buffer.alloc()</code> instead to initialize<code>Buffer</code> instances with zeroes.</p> <em>initialized</em>. The contents of the newly created <code>Buffer</code> are unknown and <em>may contain sensitive data</em>. Use <code>Buffer.alloc()</code> instead to initialize<code>Buffer</code> instances with zeroes.</p>
<pre><code class="js"><span class="hl-9">import</span><span class="hl-1"> { </span><span class="hl-10">Buffer</span><span class="hl-1"> } </span><span class="hl-9">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-8">const</span><span class="hl-1"> </span><span class="hl-11">buf</span><span class="hl-1"> = </span><span class="hl-10">Buffer</span><span class="hl-1">.</span><span class="hl-0">allocUnsafe</span><span class="hl-1">(</span><span class="hl-13">10</span><span class="hl-1">);</span><br/><br/><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-10">buf</span><span class="hl-1">);</span><br/><span class="hl-12">// Prints (contents may vary): &lt;Buffer a0 8b 28 3f 01 00 00 00 50 32&gt;</span><br/><br/><span class="hl-10">buf</span><span class="hl-1">.</span><span class="hl-0">fill</span><span class="hl-1">(</span><span class="hl-13">0</span><span class="hl-1">);</span><br/><br/><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-10">buf</span><span class="hl-1">);</span><br/><span class="hl-12">// Prints: &lt;Buffer 00 00 00 00 00 00 00 00 00 00&gt;</span> <pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">allocUnsafe</span><span class="hl-1">(</span><span class="hl-13">10</span><span class="hl-1">);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">);</span><br/><span class="hl-7">// Prints (contents may vary): &lt;Buffer a0 8b 28 3f 01 00 00 00 50 32&gt;</span><br/><br/><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-6">fill</span><span class="hl-1">(</span><span class="hl-13">0</span><span class="hl-1">);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">);</span><br/><span class="hl-7">// Prints: &lt;Buffer 00 00 00 00 00 00 00 00 00 00&gt;</span>
</code><button type="button">Copy</button></pre> </code><button type="button">Copy</button></pre>
<p>A <code>TypeError</code> will be thrown if <code>size</code> is not a number.</p> <p>A <code>TypeError</code> will be thrown if <code>size</code> is not a number.</p>
@@ -92,7 +92,7 @@ many individual <code>ArrayBuffer</code> objects.</p>
memory from a pool for an indeterminate amount of time, it may be appropriate memory from a pool for an indeterminate amount of time, it may be appropriate
to create an un-pooled <code>Buffer</code> instance using <code>Buffer.allocUnsafeSlow()</code> and to create an un-pooled <code>Buffer</code> instance using <code>Buffer.allocUnsafeSlow()</code> and
then copying out the relevant bits.</p> then copying out the relevant bits.</p>
<pre><code class="js"><span class="hl-9">import</span><span class="hl-1"> { </span><span class="hl-10">Buffer</span><span class="hl-1"> } </span><span class="hl-9">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-12">// Need to keep around a few small chunks of memory.</span><br/><span class="hl-8">const</span><span class="hl-1"> </span><span class="hl-11">store</span><span class="hl-1"> = [];</span><br/><br/><span class="hl-10">socket</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;readable&#39;</span><span class="hl-1">, () </span><span class="hl-8">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-8">let</span><span class="hl-1"> </span><span class="hl-10">data</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-9">while</span><span class="hl-1"> (</span><span class="hl-8">null</span><span class="hl-1"> !== (</span><span class="hl-10">data</span><span class="hl-1"> = </span><span class="hl-10">readable</span><span class="hl-1">.</span><span class="hl-0">read</span><span class="hl-1">())) {</span><br/><span class="hl-1"> </span><span class="hl-12">// Allocate for retained data.</span><br/><span class="hl-1"> </span><span class="hl-8">const</span><span class="hl-1"> </span><span class="hl-11">sb</span><span class="hl-1"> = </span><span class="hl-10">Buffer</span><span class="hl-1">.</span><span class="hl-0">allocUnsafeSlow</span><span class="hl-1">(</span><span class="hl-13">10</span><span class="hl-1">);</span><br/><br/><span class="hl-1"> </span><span class="hl-12">// Copy the data into the new allocation.</span><br/><span class="hl-1"> </span><span class="hl-10">data</span><span class="hl-1">.</span><span class="hl-0">copy</span><span class="hl-1">(</span><span class="hl-10">sb</span><span class="hl-1">, </span><span class="hl-13">0</span><span class="hl-1">, </span><span class="hl-13">0</span><span class="hl-1">, </span><span class="hl-13">10</span><span class="hl-1">);</span><br/><br/><span class="hl-1"> </span><span class="hl-10">store</span><span class="hl-1">.</span><span class="hl-0">push</span><span class="hl-1">(</span><span class="hl-10">sb</span><span class="hl-1">);</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">});</span> <pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-7">// Need to keep around a few small chunks of memory.</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">store</span><span class="hl-1"> = [];</span><br/><br/><span class="hl-2">socket</span><span class="hl-1">.</span><span class="hl-6">on</span><span class="hl-1">(</span><span class="hl-3">&#39;readable&#39;</span><span class="hl-1">, () </span><span class="hl-4">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-4">let</span><span class="hl-1"> </span><span class="hl-2">data</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-0">while</span><span class="hl-1"> (</span><span class="hl-4">null</span><span class="hl-1"> !== (</span><span class="hl-2">data</span><span class="hl-1"> = </span><span class="hl-2">readable</span><span class="hl-1">.</span><span class="hl-6">read</span><span class="hl-1">())) {</span><br/><span class="hl-1"> </span><span class="hl-7">// Allocate for retained data.</span><br/><span class="hl-1"> </span><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">sb</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">allocUnsafeSlow</span><span class="hl-1">(</span><span class="hl-13">10</span><span class="hl-1">);</span><br/><br/><span class="hl-1"> </span><span class="hl-7">// Copy the data into the new allocation.</span><br/><span class="hl-1"> </span><span class="hl-2">data</span><span class="hl-1">.</span><span class="hl-6">copy</span><span class="hl-1">(</span><span class="hl-2">sb</span><span class="hl-1">, </span><span class="hl-13">0</span><span class="hl-1">, </span><span class="hl-13">0</span><span class="hl-1">, </span><span class="hl-13">10</span><span class="hl-1">);</span><br/><br/><span class="hl-1"> </span><span class="hl-2">store</span><span class="hl-1">.</span><span class="hl-6">push</span><span class="hl-1">(</span><span class="hl-2">sb</span><span class="hl-1">);</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">});</span>
</code><button type="button">Copy</button></pre> </code><button type="button">Copy</button></pre>
<p>A <code>TypeError</code> will be thrown if <code>size</code> is not a number.</p> <p>A <code>TypeError</code> will be thrown if <code>size</code> is not a number.</p>
@@ -105,7 +105,7 @@ for the encoding that is used to convert the string into bytes.</p>
For strings that contain non-base64/hex-encoded data (e.g. whitespace), the For strings that contain non-base64/hex-encoded data (e.g. whitespace), the
return value might be greater than the length of a <code>Buffer</code> created from the return value might be greater than the length of a <code>Buffer</code> created from the
string.</p> string.</p>
<pre><code class="js"><span class="hl-9">import</span><span class="hl-1"> { </span><span class="hl-10">Buffer</span><span class="hl-1"> } </span><span class="hl-9">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-8">const</span><span class="hl-1"> </span><span class="hl-11">str</span><span class="hl-1"> = </span><span class="hl-2">&#39;</span><span class="hl-14">\u00bd</span><span class="hl-2"> + </span><span class="hl-14">\u00bc</span><span class="hl-2"> = </span><span class="hl-14">\u00be</span><span class="hl-2">&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">`</span><span class="hl-8">${</span><span class="hl-10">str</span><span class="hl-8">}</span><span class="hl-2">: </span><span class="hl-8">${</span><span class="hl-10">str</span><span class="hl-5">.</span><span class="hl-10">length</span><span class="hl-8">}</span><span class="hl-2"> characters, `</span><span class="hl-1"> +</span><br/><span class="hl-1"> </span><span class="hl-2">`</span><span class="hl-8">${</span><span class="hl-10">Buffer</span><span class="hl-5">.</span><span class="hl-0">byteLength</span><span class="hl-5">(</span><span class="hl-10">str</span><span class="hl-5">, </span><span class="hl-2">&#39;utf8&#39;</span><span class="hl-5">)</span><span class="hl-8">}</span><span class="hl-2"> bytes`</span><span class="hl-1">);</span><br/><span class="hl-12">// Prints: ½ + ¼ = ¾: 9 characters, 12 bytes</span> <pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">str</span><span class="hl-1"> = </span><span class="hl-3">&#39;</span><span class="hl-14">\u00bd</span><span class="hl-3"> + </span><span class="hl-14">\u00bc</span><span class="hl-3"> = </span><span class="hl-14">\u00be</span><span class="hl-3">&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-3">`</span><span class="hl-4">${</span><span class="hl-2">str</span><span class="hl-4">}</span><span class="hl-3">: </span><span class="hl-4">${</span><span class="hl-2">str</span><span class="hl-10">.</span><span class="hl-2">length</span><span class="hl-4">}</span><span class="hl-3"> characters, `</span><span class="hl-1"> +</span><br/><span class="hl-1"> </span><span class="hl-3">`</span><span class="hl-4">${</span><span class="hl-2">Buffer</span><span class="hl-10">.</span><span class="hl-6">byteLength</span><span class="hl-10">(</span><span class="hl-2">str</span><span class="hl-10">, </span><span class="hl-3">&#39;utf8&#39;</span><span class="hl-10">)</span><span class="hl-4">}</span><span class="hl-3"> bytes`</span><span class="hl-1">);</span><br/><span class="hl-7">// Prints: ½ + ¼ = ¾: 9 characters, 12 bytes</span>
</code><button type="button">Copy</button></pre> </code><button type="button">Copy</button></pre>
<p>When <code>string</code> is a <p>When <code>string</code> is a
@@ -117,7 +117,7 @@ Reference/Global_Objects/TypedArray)/<a href="https://developer.mozilla.org/en-U
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>The number of bytes contained within <code>string</code>.</p> </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>The number of bytes contained within <code>string</code>.</p>
<div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-4" class="tsd-anchor"></a>Since<a href="#Since-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.1.90</p> <div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-4" class="tsd-anchor"></a>Since<a href="#Since-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.1.90</p>
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:429</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="compare" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>compare</span><a href="#compare" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="compare.compare-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">compare</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">buf1</span>, <span class="tsd-kind-parameter">buf2</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">-1</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">0</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">1</span><a href="#compare.compare-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Compares <code>buf1</code> to <code>buf2</code>, typically for the purpose of sorting arrays of <code>Buffer</code> instances. This is equivalent to calling <code>buf1.compare(buf2)</code>.</p> </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:429</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="compare" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>compare</span><a href="#compare" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="compare.compare-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">compare</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">buf1</span>, <span class="tsd-kind-parameter">buf2</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">-1</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">0</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">1</span><a href="#compare.compare-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Compares <code>buf1</code> to <code>buf2</code>, typically for the purpose of sorting arrays of <code>Buffer</code> instances. This is equivalent to calling <code>buf1.compare(buf2)</code>.</p>
<pre><code class="js"><span class="hl-9">import</span><span class="hl-1"> { </span><span class="hl-10">Buffer</span><span class="hl-1"> } </span><span class="hl-9">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-8">const</span><span class="hl-1"> </span><span class="hl-11">buf1</span><span class="hl-1"> = </span><span class="hl-10">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">(</span><span class="hl-2">&#39;1234&#39;</span><span class="hl-1">);</span><br/><span class="hl-8">const</span><span class="hl-1"> </span><span class="hl-11">buf2</span><span class="hl-1"> = </span><span class="hl-10">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">(</span><span class="hl-2">&#39;0123&#39;</span><span class="hl-1">);</span><br/><span class="hl-8">const</span><span class="hl-1"> </span><span class="hl-11">arr</span><span class="hl-1"> = [</span><span class="hl-10">buf1</span><span class="hl-1">, </span><span class="hl-10">buf2</span><span class="hl-1">];</span><br/><br/><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-10">arr</span><span class="hl-1">.</span><span class="hl-0">sort</span><span class="hl-1">(</span><span class="hl-10">Buffer</span><span class="hl-1">.</span><span class="hl-10">compare</span><span class="hl-1">));</span><br/><span class="hl-12">// Prints: [ &lt;Buffer 30 31 32 33&gt;, &lt;Buffer 31 32 33 34&gt; ]</span><br/><span class="hl-12">// (This result is equal to: [buf2, buf1].)</span> <pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf1</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">(</span><span class="hl-3">&#39;1234&#39;</span><span class="hl-1">);</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf2</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">(</span><span class="hl-3">&#39;0123&#39;</span><span class="hl-1">);</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">arr</span><span class="hl-1"> = [</span><span class="hl-2">buf1</span><span class="hl-1">, </span><span class="hl-2">buf2</span><span class="hl-1">];</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">arr</span><span class="hl-1">.</span><span class="hl-6">sort</span><span class="hl-1">(</span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-2">compare</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: [ &lt;Buffer 30 31 32 33&gt;, &lt;Buffer 31 32 33 34&gt; ]</span><br/><span class="hl-7">// (This result is equal to: [buf2, buf1].)</span>
</code><button type="button">Copy</button></pre> </code><button type="button">Copy</button></pre>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">buf1</span>: <span class="tsd-signature-type">Uint8Array</span></span></li><li><span><span class="tsd-kind-parameter">buf2</span>: <span class="tsd-signature-type">Uint8Array</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">-1</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">0</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">1</span></h4><p>Either <code>-1</code>, <code>0</code>, or <code>1</code>, depending on the result of the comparison. See <code>compare</code> for details.</p> </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">buf1</span>: <span class="tsd-signature-type">Uint8Array</span></span></li><li><span><span class="tsd-kind-parameter">buf2</span>: <span class="tsd-signature-type">Uint8Array</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">-1</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">0</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">1</span></h4><p>Either <code>-1</code>, <code>0</code>, or <code>1</code>, depending on the result of the comparison. See <code>compare</code> for details.</p>
@@ -129,7 +129,7 @@ in <code>list</code> by adding their lengths.</p>
<p>If <code>totalLength</code> is provided, it is coerced to an unsigned integer. If the <p>If <code>totalLength</code> is provided, it is coerced to an unsigned integer. If the
combined length of the <code>Buffer</code>s in <code>list</code> exceeds <code>totalLength</code>, the result is combined length of the <code>Buffer</code>s in <code>list</code> exceeds <code>totalLength</code>, the result is
truncated to <code>totalLength</code>.</p> truncated to <code>totalLength</code>.</p>
<pre><code class="js"><span class="hl-9">import</span><span class="hl-1"> { </span><span class="hl-10">Buffer</span><span class="hl-1"> } </span><span class="hl-9">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-12">// Create a single `Buffer` from a list of three `Buffer` instances.</span><br/><br/><span class="hl-8">const</span><span class="hl-1"> </span><span class="hl-11">buf1</span><span class="hl-1"> = </span><span class="hl-10">Buffer</span><span class="hl-1">.</span><span class="hl-0">alloc</span><span class="hl-1">(</span><span class="hl-13">10</span><span class="hl-1">);</span><br/><span class="hl-8">const</span><span class="hl-1"> </span><span class="hl-11">buf2</span><span class="hl-1"> = </span><span class="hl-10">Buffer</span><span class="hl-1">.</span><span class="hl-0">alloc</span><span class="hl-1">(</span><span class="hl-13">14</span><span class="hl-1">);</span><br/><span class="hl-8">const</span><span class="hl-1"> </span><span class="hl-11">buf3</span><span class="hl-1"> = </span><span class="hl-10">Buffer</span><span class="hl-1">.</span><span class="hl-0">alloc</span><span class="hl-1">(</span><span class="hl-13">18</span><span class="hl-1">);</span><br/><span class="hl-8">const</span><span class="hl-1"> </span><span class="hl-11">totalLength</span><span class="hl-1"> = </span><span class="hl-10">buf1</span><span class="hl-1">.</span><span class="hl-10">length</span><span class="hl-1"> + </span><span class="hl-10">buf2</span><span class="hl-1">.</span><span class="hl-10">length</span><span class="hl-1"> + </span><span class="hl-10">buf3</span><span class="hl-1">.</span><span class="hl-10">length</span><span class="hl-1">;</span><br/><br/><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-10">totalLength</span><span class="hl-1">);</span><br/><span class="hl-12">// Prints: 42</span><br/><br/><span class="hl-8">const</span><span class="hl-1"> </span><span class="hl-11">bufA</span><span class="hl-1"> = </span><span class="hl-10">Buffer</span><span class="hl-1">.</span><span class="hl-0">concat</span><span class="hl-1">([</span><span class="hl-10">buf1</span><span class="hl-1">, </span><span class="hl-10">buf2</span><span class="hl-1">, </span><span class="hl-10">buf3</span><span class="hl-1">], </span><span class="hl-10">totalLength</span><span class="hl-1">);</span><br/><br/><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-10">bufA</span><span class="hl-1">);</span><br/><span class="hl-12">// Prints: &lt;Buffer 00 00 00 00 ...&gt;</span><br/><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-10">bufA</span><span class="hl-1">.</span><span class="hl-10">length</span><span class="hl-1">);</span><br/><span class="hl-12">// Prints: 42</span> <pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-7">// Create a single `Buffer` from a list of three `Buffer` instances.</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf1</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">alloc</span><span class="hl-1">(</span><span class="hl-13">10</span><span class="hl-1">);</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf2</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">alloc</span><span class="hl-1">(</span><span class="hl-13">14</span><span class="hl-1">);</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf3</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">alloc</span><span class="hl-1">(</span><span class="hl-13">18</span><span class="hl-1">);</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">totalLength</span><span class="hl-1"> = </span><span class="hl-2">buf1</span><span class="hl-1">.</span><span class="hl-2">length</span><span class="hl-1"> + </span><span class="hl-2">buf2</span><span class="hl-1">.</span><span class="hl-2">length</span><span class="hl-1"> + </span><span class="hl-2">buf3</span><span class="hl-1">.</span><span class="hl-2">length</span><span class="hl-1">;</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">totalLength</span><span class="hl-1">);</span><br/><span class="hl-7">// Prints: 42</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">bufA</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">concat</span><span class="hl-1">([</span><span class="hl-2">buf1</span><span class="hl-1">, </span><span class="hl-2">buf2</span><span class="hl-1">, </span><span class="hl-2">buf3</span><span class="hl-1">], </span><span class="hl-2">totalLength</span><span class="hl-1">);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">bufA</span><span class="hl-1">);</span><br/><span class="hl-7">// Prints: &lt;Buffer 00 00 00 00 ...&gt;</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">bufA</span><span class="hl-1">.</span><span class="hl-2">length</span><span class="hl-1">);</span><br/><span class="hl-7">// Prints: 42</span>
</code><button type="button">Copy</button></pre> </code><button type="button">Copy</button></pre>
<p><code>Buffer.concat()</code> may also use the internal <code>Buffer</code> pool like <code>Buffer.allocUnsafe()</code> does.</p> <p><code>Buffer.concat()</code> may also use the internal <code>Buffer</code> pool like <code>Buffer.allocUnsafe()</code> does.</p>
@@ -137,7 +137,7 @@ truncated to <code>totalLength</code>.</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">totalLength</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Total length of the <code>Buffer</code> instances in <code>list</code> when concatenated.</p> </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">totalLength</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Total length of the <code>Buffer</code> instances in <code>list</code> when concatenated.</p>
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-6" class="tsd-anchor"></a>Since<a href="#Since-6" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.7.11</p> </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-6" class="tsd-anchor"></a>Since<a href="#Since-6" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.7.11</p>
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:471</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="copyBytesFrom" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>copy<wbr/>Bytes<wbr/>From</span><a href="#copyBytesFrom" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="copyBytesFrom.copyBytesFrom-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">copy<wbr/>Bytes<wbr/>From</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">view</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">length</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a><a href="#copyBytesFrom.copyBytesFrom-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Copies the underlying memory of <code>view</code> into a new <code>Buffer</code>.</p> </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:471</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="copyBytesFrom" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>copy<wbr/>Bytes<wbr/>From</span><a href="#copyBytesFrom" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="copyBytesFrom.copyBytesFrom-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">copy<wbr/>Bytes<wbr/>From</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">view</span>, <span class="tsd-kind-parameter">offset</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">length</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a><a href="#copyBytesFrom.copyBytesFrom-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Copies the underlying memory of <code>view</code> into a new <code>Buffer</code>.</p>
<pre><code class="js"><span class="hl-8">const</span><span class="hl-1"> </span><span class="hl-11">u16</span><span class="hl-1"> = </span><span class="hl-8">new</span><span class="hl-1"> </span><span class="hl-0">Uint16Array</span><span class="hl-1">([</span><span class="hl-13">0</span><span class="hl-1">, </span><span class="hl-13">0xffff</span><span class="hl-1">]);</span><br/><span class="hl-8">const</span><span class="hl-1"> </span><span class="hl-11">buf</span><span class="hl-1"> = </span><span class="hl-10">Buffer</span><span class="hl-1">.</span><span class="hl-0">copyBytesFrom</span><span class="hl-1">(</span><span class="hl-10">u16</span><span class="hl-1">, </span><span class="hl-13">1</span><span class="hl-1">, </span><span class="hl-13">1</span><span class="hl-1">);</span><br/><span class="hl-10">u16</span><span class="hl-1">[</span><span class="hl-13">1</span><span class="hl-1">] = </span><span class="hl-13">0</span><span class="hl-1">;</span><br/><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-10">buf</span><span class="hl-1">.</span><span class="hl-10">length</span><span class="hl-1">); </span><span class="hl-12">// 2</span><br/><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-10">buf</span><span class="hl-1">[</span><span class="hl-13">0</span><span class="hl-1">]); </span><span class="hl-12">// 255</span><br/><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-10">buf</span><span class="hl-1">[</span><span class="hl-13">1</span><span class="hl-1">]); </span><span class="hl-12">// 255</span> <pre><code class="js"><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">u16</span><span class="hl-1"> = </span><span class="hl-4">new</span><span class="hl-1"> </span><span class="hl-6">Uint16Array</span><span class="hl-1">([</span><span class="hl-13">0</span><span class="hl-1">, </span><span class="hl-13">0xffff</span><span class="hl-1">]);</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">copyBytesFrom</span><span class="hl-1">(</span><span class="hl-2">u16</span><span class="hl-1">, </span><span class="hl-13">1</span><span class="hl-1">, </span><span class="hl-13">1</span><span class="hl-1">);</span><br/><span class="hl-2">u16</span><span class="hl-1">[</span><span class="hl-13">1</span><span class="hl-1">] = </span><span class="hl-13">0</span><span class="hl-1">;</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">.</span><span class="hl-2">length</span><span class="hl-1">); </span><span class="hl-7">// 2</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">[</span><span class="hl-13">0</span><span class="hl-1">]); </span><span class="hl-7">// 255</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">buf</span><span class="hl-1">[</span><span class="hl-13">1</span><span class="hl-1">]); </span><span class="hl-7">// 255</span>
</code><button type="button">Copy</button></pre> </code><button type="button">Copy</button></pre>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">view</span>: <a href="../types/_internal_.TypedArray.html" class="tsd-signature-type tsd-kind-type-alias">TypedArray</a></span><div class="tsd-comment tsd-typography"><p>The {TypedArray} to copy.</p> </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">view</span>: <a href="../types/_internal_.TypedArray.html" class="tsd-signature-type tsd-kind-type-alias">TypedArray</a></span><div class="tsd-comment tsd-typography"><p>The {TypedArray} to copy.</p>
@@ -146,7 +146,7 @@ truncated to <code>totalLength</code>.</p>
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-7" class="tsd-anchor"></a>Since<a href="#Since-7" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v19.8.0</p> </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-7" class="tsd-anchor"></a>Since<a href="#Since-7" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v19.8.0</p>
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:488</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="from" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>from</span><a href="#from" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="from.from-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">from</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">arrayBuffer</span>, <span class="tsd-kind-parameter">byteOffset</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">length</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a><a href="#from.from-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Allocates a new <code>Buffer</code> using an <code>array</code> of bytes in the range <code>0</code> – <code>255</code>. </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:488</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="from" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>from</span><a href="#from" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="from.from-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">from</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">arrayBuffer</span>, <span class="tsd-kind-parameter">byteOffset</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">length</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a><a href="#from.from-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Allocates a new <code>Buffer</code> using an <code>array</code> of bytes in the range <code>0</code> – <code>255</code>.
Array entries outside that range will be truncated to fit into it.</p> Array entries outside that range will be truncated to fit into it.</p>
<pre><code class="js"><span class="hl-9">import</span><span class="hl-1"> { </span><span class="hl-10">Buffer</span><span class="hl-1"> } </span><span class="hl-9">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-12">// Creates a new Buffer containing the UTF-8 bytes of the string &#39;buffer&#39;.</span><br/><span class="hl-8">const</span><span class="hl-1"> </span><span class="hl-11">buf</span><span class="hl-1"> = </span><span class="hl-10">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">([</span><span class="hl-13">0x62</span><span class="hl-1">, </span><span class="hl-13">0x75</span><span class="hl-1">, </span><span class="hl-13">0x66</span><span class="hl-1">, </span><span class="hl-13">0x66</span><span class="hl-1">, </span><span class="hl-13">0x65</span><span class="hl-1">, </span><span class="hl-13">0x72</span><span class="hl-1">]);</span> <pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-7">// Creates a new Buffer containing the UTF-8 bytes of the string &#39;buffer&#39;.</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">buf</span><span class="hl-1"> = </span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">([</span><span class="hl-13">0x62</span><span class="hl-1">, </span><span class="hl-13">0x75</span><span class="hl-1">, </span><span class="hl-13">0x66</span><span class="hl-1">, </span><span class="hl-13">0x66</span><span class="hl-1">, </span><span class="hl-13">0x65</span><span class="hl-1">, </span><span class="hl-13">0x72</span><span class="hl-1">]);</span>
</code><button type="button">Copy</button></pre> </code><button type="button">Copy</button></pre>
<p>If <code>array</code> is an <code>Array</code>-like object (that is, one with a <code>length</code> property of <p>If <code>array</code> is an <code>Array</code>-like object (that is, one with a <code>length</code> property of
@@ -162,13 +162,13 @@ appropriate for <code>Buffer.from()</code> variants.</p>
If provided, the {encoding} parameter identifies the character encoding. If provided, the {encoding} parameter identifies the character encoding.
If not provided, {encoding} defaults to 'utf8'.</p> If not provided, {encoding} defaults to 'utf8'.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">str</span>: <a href="../types/_internal_.WithImplicitCoercion.html" class="tsd-signature-type tsd-kind-type-alias">WithImplicitCoercion</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">{ </span><br/><span>    </span><span class="tsd-kind-call-signature">[toPrimitive]</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">hint</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">&quot;string&quot;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span></span></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">encoding</span>: <a href="../types/_internal_.BufferEncoding.html" class="tsd-signature-type tsd-kind-type-alias">BufferEncoding</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <a href="_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:349</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="isBuffer" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>is<wbr/>Buffer</span><a href="#isBuffer" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="isBuffer.isBuffer-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">is<wbr/>Buffer</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">obj</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-kind-parameter">obj</span><span class="tsd-signature-keyword"> is </span><a href="_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a><a href="#isBuffer.isBuffer-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns <code>true</code> if <code>obj</code> is a <code>Buffer</code>, <code>false</code> otherwise.</p> </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">str</span>: <a href="../types/_internal_.WithImplicitCoercion.html" class="tsd-signature-type tsd-kind-type-alias">WithImplicitCoercion</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">{ </span><br/><span>    </span><span class="tsd-kind-call-signature">[toPrimitive]</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">hint</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">&quot;string&quot;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span></span></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">encoding</span>: <a href="../types/_internal_.BufferEncoding.html" class="tsd-signature-type tsd-kind-type-alias">BufferEncoding</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <a href="_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:349</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="isBuffer" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>is<wbr/>Buffer</span><a href="#isBuffer" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="isBuffer.isBuffer-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">is<wbr/>Buffer</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">obj</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-kind-parameter">obj</span><span class="tsd-signature-keyword"> is </span><a href="_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a><a href="#isBuffer.isBuffer-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns <code>true</code> if <code>obj</code> is a <code>Buffer</code>, <code>false</code> otherwise.</p>
<pre><code class="js"><span class="hl-9">import</span><span class="hl-1"> { </span><span class="hl-10">Buffer</span><span class="hl-1"> } </span><span class="hl-9">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-10">Buffer</span><span class="hl-1">.</span><span class="hl-0">isBuffer</span><span class="hl-1">(</span><span class="hl-10">Buffer</span><span class="hl-1">.</span><span class="hl-0">alloc</span><span class="hl-1">(</span><span class="hl-13">10</span><span class="hl-1">)); </span><span class="hl-12">// true</span><br/><span class="hl-10">Buffer</span><span class="hl-1">.</span><span class="hl-0">isBuffer</span><span class="hl-1">(</span><span class="hl-10">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">(</span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">)); </span><span class="hl-12">// true</span><br/><span class="hl-10">Buffer</span><span class="hl-1">.</span><span class="hl-0">isBuffer</span><span class="hl-1">(</span><span class="hl-2">&#39;a string&#39;</span><span class="hl-1">); </span><span class="hl-12">// false</span><br/><span class="hl-10">Buffer</span><span class="hl-1">.</span><span class="hl-0">isBuffer</span><span class="hl-1">([]); </span><span class="hl-12">// false</span><br/><span class="hl-10">Buffer</span><span class="hl-1">.</span><span class="hl-0">isBuffer</span><span class="hl-1">(</span><span class="hl-8">new</span><span class="hl-1"> </span><span class="hl-0">Uint8Array</span><span class="hl-1">(</span><span class="hl-13">1024</span><span class="hl-1">)); </span><span class="hl-12">// false</span> <pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">isBuffer</span><span class="hl-1">(</span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">alloc</span><span class="hl-1">(</span><span class="hl-13">10</span><span class="hl-1">)); </span><span class="hl-7">// true</span><br/><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">isBuffer</span><span class="hl-1">(</span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">from</span><span class="hl-1">(</span><span class="hl-3">&#39;foo&#39;</span><span class="hl-1">)); </span><span class="hl-7">// true</span><br/><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">isBuffer</span><span class="hl-1">(</span><span class="hl-3">&#39;a string&#39;</span><span class="hl-1">); </span><span class="hl-7">// false</span><br/><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">isBuffer</span><span class="hl-1">([]); </span><span class="hl-7">// false</span><br/><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">isBuffer</span><span class="hl-1">(</span><span class="hl-4">new</span><span class="hl-1"> </span><span class="hl-6">Uint8Array</span><span class="hl-1">(</span><span class="hl-13">1024</span><span class="hl-1">)); </span><span class="hl-7">// false</span>
</code><button type="button">Copy</button></pre> </code><button type="button">Copy</button></pre>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">obj</span>: <span class="tsd-signature-type">any</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-kind-parameter">obj</span><span class="tsd-signature-keyword"> is </span><a href="_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-9" class="tsd-anchor"></a>Since<a href="#Since-9" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.1.101</p> </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">obj</span>: <span class="tsd-signature-type">any</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-kind-parameter">obj</span><span class="tsd-signature-keyword"> is </span><a href="_internal_.Buffer.html" class="tsd-signature-type tsd-kind-interface">Buffer</a></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-9" class="tsd-anchor"></a>Since<a href="#Since-9" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.1.101</p>
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:376</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="isEncoding" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>is<wbr/>Encoding</span><a href="#isEncoding" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="isEncoding.isEncoding-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">is<wbr/>Encoding</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">encoding</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-kind-parameter">encoding</span><span class="tsd-signature-keyword"> is </span><a href="../types/_internal_.BufferEncoding.html" class="tsd-signature-type tsd-kind-type-alias">BufferEncoding</a><a href="#isEncoding.isEncoding-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns <code>true</code> if <code>encoding</code> is the name of a supported character encoding, </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/buffer.d.ts:376</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="isEncoding" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>is<wbr/>Encoding</span><a href="#isEncoding" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="isEncoding.isEncoding-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">is<wbr/>Encoding</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">encoding</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-kind-parameter">encoding</span><span class="tsd-signature-keyword"> is </span><a href="../types/_internal_.BufferEncoding.html" class="tsd-signature-type tsd-kind-type-alias">BufferEncoding</a><a href="#isEncoding.isEncoding-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns <code>true</code> if <code>encoding</code> is the name of a supported character encoding,
or <code>false</code> otherwise.</p> or <code>false</code> otherwise.</p>
<pre><code class="js"><span class="hl-9">import</span><span class="hl-1"> { </span><span class="hl-10">Buffer</span><span class="hl-1"> } </span><span class="hl-9">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-10">Buffer</span><span class="hl-1">.</span><span class="hl-0">isEncoding</span><span class="hl-1">(</span><span class="hl-2">&#39;utf8&#39;</span><span class="hl-1">));</span><br/><span class="hl-12">// Prints: true</span><br/><br/><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-10">Buffer</span><span class="hl-1">.</span><span class="hl-0">isEncoding</span><span class="hl-1">(</span><span class="hl-2">&#39;hex&#39;</span><span class="hl-1">));</span><br/><span class="hl-12">// Prints: true</span><br/><br/><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-10">Buffer</span><span class="hl-1">.</span><span class="hl-0">isEncoding</span><span class="hl-1">(</span><span class="hl-2">&#39;utf/8&#39;</span><span class="hl-1">));</span><br/><span class="hl-12">// Prints: false</span><br/><br/><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-10">Buffer</span><span class="hl-1">.</span><span class="hl-0">isEncoding</span><span class="hl-1">(</span><span class="hl-2">&#39;&#39;</span><span class="hl-1">));</span><br/><span class="hl-12">// Prints: false</span> <pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">Buffer</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">&#39;node:buffer&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">isEncoding</span><span class="hl-1">(</span><span class="hl-3">&#39;utf8&#39;</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: true</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">isEncoding</span><span class="hl-1">(</span><span class="hl-3">&#39;hex&#39;</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: true</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">isEncoding</span><span class="hl-1">(</span><span class="hl-3">&#39;utf/8&#39;</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: false</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">Buffer</span><span class="hl-1">.</span><span class="hl-6">isEncoding</span><span class="hl-1">(</span><span class="hl-3">&#39;&#39;</span><span class="hl-1">));</span><br/><span class="hl-7">// Prints: false</span>
</code><button type="button">Copy</button></pre> </code><button type="button">Copy</button></pre>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">encoding</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>A character encoding name to check.</p> </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">encoding</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>A character encoding name to check.</p>
+13 -13
View File
@@ -19,13 +19,13 @@
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/events.d.ts:597</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="emit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>emit</span><a href="#emit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="emit.emit-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">emit</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.EventEmitter.html#emit.emit-1.K-2">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">eventName</span>, <span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#emit.emit-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Synchronously calls each of the listeners registered for the event named <code>eventName</code>, in the order they were registered, passing the supplied arguments </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/events.d.ts:597</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="emit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>emit</span><a href="#emit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="emit.emit-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">emit</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.EventEmitter.html#emit.emit-1.K-2">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">eventName</span>, <span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#emit.emit-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Synchronously calls each of the listeners registered for the event named <code>eventName</code>, in the order they were registered, passing the supplied arguments
to each.</p> to each.</p>
<p>Returns <code>true</code> if the event had listeners, <code>false</code> otherwise.</p> <p>Returns <code>true</code> if the event had listeners, <code>false</code> otherwise.</p>
<pre><code class="js"><span class="hl-9">import</span><span class="hl-1"> { </span><span class="hl-10">EventEmitter</span><span class="hl-1"> } </span><span class="hl-9">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><span class="hl-8">const</span><span class="hl-1"> </span><span class="hl-11">myEmitter</span><span class="hl-1"> = </span><span class="hl-8">new</span><span class="hl-1"> </span><span class="hl-0">EventEmitter</span><span class="hl-1">();</span><br/><br/><span class="hl-12">// First listener</span><br/><span class="hl-10">myEmitter</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;event&#39;</span><span class="hl-1">, </span><span class="hl-8">function</span><span class="hl-1"> </span><span class="hl-0">firstListener</span><span class="hl-1">() {</span><br/><span class="hl-1"> </span><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;Helloooo! first listener&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">});</span><br/><span class="hl-12">// Second listener</span><br/><span class="hl-10">myEmitter</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;event&#39;</span><span class="hl-1">, </span><span class="hl-8">function</span><span class="hl-1"> </span><span class="hl-0">secondListener</span><span class="hl-1">(</span><span class="hl-10">arg1</span><span class="hl-1">, </span><span class="hl-10">arg2</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">`event with parameters </span><span class="hl-8">${</span><span class="hl-10">arg1</span><span class="hl-8">}</span><span class="hl-2">, </span><span class="hl-8">${</span><span class="hl-10">arg2</span><span class="hl-8">}</span><span class="hl-2"> in second listener`</span><span class="hl-1">);</span><br/><span class="hl-1">});</span><br/><span class="hl-12">// Third listener</span><br/><span class="hl-10">myEmitter</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;event&#39;</span><span class="hl-1">, </span><span class="hl-8">function</span><span class="hl-1"> </span><span class="hl-0">thirdListener</span><span class="hl-1">(...</span><span class="hl-10">args</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-8">const</span><span class="hl-1"> </span><span class="hl-11">parameters</span><span class="hl-1"> = </span><span class="hl-10">args</span><span class="hl-1">.</span><span class="hl-0">join</span><span class="hl-1">(</span><span class="hl-2">&#39;, &#39;</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">`event with parameters </span><span class="hl-8">${</span><span class="hl-10">parameters</span><span class="hl-8">}</span><span class="hl-2"> in third listener`</span><span class="hl-1">);</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-10">myEmitter</span><span class="hl-1">.</span><span class="hl-0">listeners</span><span class="hl-1">(</span><span class="hl-2">&#39;event&#39;</span><span class="hl-1">));</span><br/><br/><span class="hl-10">myEmitter</span><span class="hl-1">.</span><span class="hl-0">emit</span><span class="hl-1">(</span><span class="hl-2">&#39;event&#39;</span><span class="hl-1">, </span><span class="hl-13">1</span><span class="hl-1">, </span><span class="hl-13">2</span><span class="hl-1">, </span><span class="hl-13">3</span><span class="hl-1">, </span><span class="hl-13">4</span><span class="hl-1">, </span><span class="hl-13">5</span><span class="hl-1">);</span><br/><br/><span class="hl-12">// Prints:</span><br/><span class="hl-12">// [</span><br/><span class="hl-12">// [Function: firstListener],</span><br/><span class="hl-12">// [Function: secondListener],</span><br/><span class="hl-12">// [Function: thirdListener]</span><br/><span class="hl-12">// ]</span><br/><span class="hl-12">// Helloooo! first listener</span><br/><span class="hl-12">// event with parameters 1, 2 in second listener</span><br/><span class="hl-12">// event with parameters 1, 2, 3, 4, 5 in third listener</span> <pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">EventEmitter</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">myEmitter</span><span class="hl-1"> = </span><span class="hl-4">new</span><span class="hl-1"> </span><span class="hl-6">EventEmitter</span><span class="hl-1">();</span><br/><br/><span class="hl-7">// First listener</span><br/><span class="hl-2">myEmitter</span><span class="hl-1">.</span><span class="hl-6">on</span><span class="hl-1">(</span><span class="hl-3">&#39;event&#39;</span><span class="hl-1">, </span><span class="hl-4">function</span><span class="hl-1"> </span><span class="hl-6">firstListener</span><span class="hl-1">() {</span><br/><span class="hl-1"> </span><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-3">&#39;Helloooo! first listener&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">});</span><br/><span class="hl-7">// Second listener</span><br/><span class="hl-2">myEmitter</span><span class="hl-1">.</span><span class="hl-6">on</span><span class="hl-1">(</span><span class="hl-3">&#39;event&#39;</span><span class="hl-1">, </span><span class="hl-4">function</span><span class="hl-1"> </span><span class="hl-6">secondListener</span><span class="hl-1">(</span><span class="hl-2">arg1</span><span class="hl-1">, </span><span class="hl-2">arg2</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-3">`event with parameters </span><span class="hl-4">${</span><span class="hl-2">arg1</span><span class="hl-4">}</span><span class="hl-3">, </span><span class="hl-4">${</span><span class="hl-2">arg2</span><span class="hl-4">}</span><span class="hl-3"> in second listener`</span><span class="hl-1">);</span><br/><span class="hl-1">});</span><br/><span class="hl-7">// Third listener</span><br/><span class="hl-2">myEmitter</span><span class="hl-1">.</span><span class="hl-6">on</span><span class="hl-1">(</span><span class="hl-3">&#39;event&#39;</span><span class="hl-1">, </span><span class="hl-4">function</span><span class="hl-1"> </span><span class="hl-6">thirdListener</span><span class="hl-1">(...</span><span class="hl-2">args</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">parameters</span><span class="hl-1"> = </span><span class="hl-2">args</span><span class="hl-1">.</span><span class="hl-6">join</span><span class="hl-1">(</span><span class="hl-3">&#39;, &#39;</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-3">`event with parameters </span><span class="hl-4">${</span><span class="hl-2">parameters</span><span class="hl-4">}</span><span class="hl-3"> in third listener`</span><span class="hl-1">);</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">myEmitter</span><span class="hl-1">.</span><span class="hl-6">listeners</span><span class="hl-1">(</span><span class="hl-3">&#39;event&#39;</span><span class="hl-1">));</span><br/><br/><span class="hl-2">myEmitter</span><span class="hl-1">.</span><span class="hl-6">emit</span><span class="hl-1">(</span><span class="hl-3">&#39;event&#39;</span><span class="hl-1">, </span><span class="hl-13">1</span><span class="hl-1">, </span><span class="hl-13">2</span><span class="hl-1">, </span><span class="hl-13">3</span><span class="hl-1">, </span><span class="hl-13">4</span><span class="hl-1">, </span><span class="hl-13">5</span><span class="hl-1">);</span><br/><br/><span class="hl-7">// Prints:</span><br/><span class="hl-7">// [</span><br/><span class="hl-7">// [Function: firstListener],</span><br/><span class="hl-7">// [Function: secondListener],</span><br/><span class="hl-7">// [Function: thirdListener]</span><br/><span class="hl-7">// ]</span><br/><span class="hl-7">// Helloooo! first listener</span><br/><span class="hl-7">// event with parameters 1, 2 in second listener</span><br/><span class="hl-7">// event with parameters 1, 2, 3, 4, 5 in third listener</span>
</code><button type="button">Copy</button></pre> </code><button type="button">Copy</button></pre>
</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="emit.emit-1.K-2" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">K</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">eventName</span>: <a href="../types/_internal_.Key.html" class="tsd-signature-type tsd-kind-type-alias">Key</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.ReadableStream.html#emit.emit-1.K-2">K</a><span class="tsd-signature-symbol">, </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.EventEmitter.html#T">T</a><span class="tsd-signature-symbol">&gt;</span></span></li><li><span><code class="tsd-tag">Rest</code><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span>: <a href="../types/_internal_.Args.html" class="tsd-signature-type tsd-kind-type-alias">Args</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.ReadableStream.html#emit.emit-1.K-2">K</a><span class="tsd-signature-symbol">, </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.EventEmitter.html#T">T</a><span class="tsd-signature-symbol">&gt;</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-1" class="tsd-anchor"></a>Since<a href="#Since-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.1.26</p> </div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="emit.emit-1.K-2" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">K</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">eventName</span>: <a href="../types/_internal_.Key.html" class="tsd-signature-type tsd-kind-type-alias">Key</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.ReadableStream.html#emit.emit-1.K-2">K</a><span class="tsd-signature-symbol">, </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.EventEmitter.html#T">T</a><span class="tsd-signature-symbol">&gt;</span></span></li><li><span><code class="tsd-tag">Rest</code><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span>: <a href="../types/_internal_.Args.html" class="tsd-signature-type tsd-kind-type-alias">Args</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.ReadableStream.html#emit.emit-1.K-2">K</a><span class="tsd-signature-symbol">, </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.EventEmitter.html#T">T</a><span class="tsd-signature-symbol">&gt;</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-1" class="tsd-anchor"></a>Since<a href="#Since-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.1.26</p>
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/events.d.ts:859</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="eventNames" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>event<wbr/>Names</span><a href="#eventNames" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="eventNames.eventNames-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">event<wbr/>Names</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> &amp; </span><a href="../types/_internal_.Key2.html" class="tsd-signature-type tsd-kind-type-alias">Key2</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">, </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.EventEmitter.html#T">T</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span><a href="#eventNames.eventNames-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns an array listing the events for which the emitter has registered </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/events.d.ts:859</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="eventNames" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>event<wbr/>Names</span><a href="#eventNames" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="eventNames.eventNames-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">event<wbr/>Names</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> &amp; </span><a href="../types/_internal_.Key2.html" class="tsd-signature-type tsd-kind-type-alias">Key2</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">, </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.EventEmitter.html#T">T</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span><a href="#eventNames.eventNames-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns an array listing the events for which the emitter has registered
listeners. The values in the array are strings or <code>Symbol</code>s.</p> listeners. The values in the array are strings or <code>Symbol</code>s.</p>
<pre><code class="js"><span class="hl-9">import</span><span class="hl-1"> { </span><span class="hl-10">EventEmitter</span><span class="hl-1"> } </span><span class="hl-9">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-8">const</span><span class="hl-1"> </span><span class="hl-11">myEE</span><span class="hl-1"> = </span><span class="hl-8">new</span><span class="hl-1"> </span><span class="hl-0">EventEmitter</span><span class="hl-1">();</span><br/><span class="hl-10">myEE</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">, () </span><span class="hl-8">=&gt;</span><span class="hl-1"> {});</span><br/><span class="hl-10">myEE</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;bar&#39;</span><span class="hl-1">, () </span><span class="hl-8">=&gt;</span><span class="hl-1"> {});</span><br/><br/><span class="hl-8">const</span><span class="hl-1"> </span><span class="hl-11">sym</span><span class="hl-1"> = </span><span class="hl-0">Symbol</span><span class="hl-1">(</span><span class="hl-2">&#39;symbol&#39;</span><span class="hl-1">);</span><br/><span class="hl-10">myEE</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-10">sym</span><span class="hl-1">, () </span><span class="hl-8">=&gt;</span><span class="hl-1"> {});</span><br/><br/><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-10">myEE</span><span class="hl-1">.</span><span class="hl-0">eventNames</span><span class="hl-1">());</span><br/><span class="hl-12">// Prints: [ &#39;foo&#39;, &#39;bar&#39;, Symbol(symbol) ]</span> <pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">EventEmitter</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">myEE</span><span class="hl-1"> = </span><span class="hl-4">new</span><span class="hl-1"> </span><span class="hl-6">EventEmitter</span><span class="hl-1">();</span><br/><span class="hl-2">myEE</span><span class="hl-1">.</span><span class="hl-6">on</span><span class="hl-1">(</span><span class="hl-3">&#39;foo&#39;</span><span class="hl-1">, () </span><span class="hl-4">=&gt;</span><span class="hl-1"> {});</span><br/><span class="hl-2">myEE</span><span class="hl-1">.</span><span class="hl-6">on</span><span class="hl-1">(</span><span class="hl-3">&#39;bar&#39;</span><span class="hl-1">, () </span><span class="hl-4">=&gt;</span><span class="hl-1"> {});</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">sym</span><span class="hl-1"> = </span><span class="hl-6">Symbol</span><span class="hl-1">(</span><span class="hl-3">&#39;symbol&#39;</span><span class="hl-1">);</span><br/><span class="hl-2">myEE</span><span class="hl-1">.</span><span class="hl-6">on</span><span class="hl-1">(</span><span class="hl-2">sym</span><span class="hl-1">, () </span><span class="hl-4">=&gt;</span><span class="hl-1"> {});</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">myEE</span><span class="hl-1">.</span><span class="hl-6">eventNames</span><span class="hl-1">());</span><br/><span class="hl-7">// Prints: [ &#39;foo&#39;, &#39;bar&#39;, Symbol(symbol) ]</span>
</code><button type="button">Copy</button></pre> </code><button type="button">Copy</button></pre>
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> &amp; </span><a href="../types/_internal_.Key2.html" class="tsd-signature-type tsd-kind-type-alias">Key2</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">, </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.EventEmitter.html#T">T</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-2" class="tsd-anchor"></a>Since<a href="#Since-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v6.0.0</p> </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> &amp; </span><a href="../types/_internal_.Key2.html" class="tsd-signature-type tsd-kind-type-alias">Key2</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">, </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.EventEmitter.html#T">T</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-2" class="tsd-anchor"></a>Since<a href="#Since-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v6.0.0</p>
@@ -39,7 +39,7 @@ in the list of the listeners of the event.</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">listener</span>: <a href="../types/_internal_.Listener.html" class="tsd-signature-type tsd-kind-type-alias">Listener</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.ReadableStream.html#listenerCount.listenerCount-1.K-3">K</a><span class="tsd-signature-symbol">, </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.EventEmitter.html#T">T</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">Function</span><span class="tsd-signature-symbol">&gt;</span></span><div class="tsd-comment tsd-typography"><p>The event handler function</p> </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">listener</span>: <a href="../types/_internal_.Listener.html" class="tsd-signature-type tsd-kind-type-alias">Listener</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.ReadableStream.html#listenerCount.listenerCount-1.K-3">K</a><span class="tsd-signature-symbol">, </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.EventEmitter.html#T">T</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">Function</span><span class="tsd-signature-symbol">&gt;</span></span><div class="tsd-comment tsd-typography"><p>The event handler function</p>
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-4" class="tsd-anchor"></a>Since<a href="#Since-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v3.2.0</p> </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-4" class="tsd-anchor"></a>Since<a href="#Since-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v3.2.0</p>
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/events.d.ts:868</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="listeners" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>listeners</span><a href="#listeners" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="listeners.listeners-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">listeners</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.EventEmitter.html#listeners.listeners-1.K-4">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">eventName</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../types/_internal_.Listener.html" class="tsd-signature-type tsd-kind-type-alias">Listener</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.ReadableStream.html#listeners.listeners-1.K-4">K</a><span class="tsd-signature-symbol">, </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.EventEmitter.html#T">T</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">Function</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">[]</span><a href="#listeners.listeners-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns a copy of the array of listeners for the event named <code>eventName</code>.</p> </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/events.d.ts:868</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="listeners" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>listeners</span><a href="#listeners" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="listeners.listeners-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">listeners</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.EventEmitter.html#listeners.listeners-1.K-4">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">eventName</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../types/_internal_.Listener.html" class="tsd-signature-type tsd-kind-type-alias">Listener</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.ReadableStream.html#listeners.listeners-1.K-4">K</a><span class="tsd-signature-symbol">, </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.EventEmitter.html#T">T</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">Function</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">[]</span><a href="#listeners.listeners-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns a copy of the array of listeners for the event named <code>eventName</code>.</p>
<pre><code class="js"><span class="hl-10">server</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;connection&#39;</span><span class="hl-1">, (</span><span class="hl-10">stream</span><span class="hl-1">) </span><span class="hl-8">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;someone connected!&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">});</span><br/><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-10">util</span><span class="hl-1">.</span><span class="hl-0">inspect</span><span class="hl-1">(</span><span class="hl-10">server</span><span class="hl-1">.</span><span class="hl-0">listeners</span><span class="hl-1">(</span><span class="hl-2">&#39;connection&#39;</span><span class="hl-1">)));</span><br/><span class="hl-12">// Prints: [ [Function] ]</span> <pre><code class="js"><span class="hl-2">server</span><span class="hl-1">.</span><span class="hl-6">on</span><span class="hl-1">(</span><span class="hl-3">&#39;connection&#39;</span><span class="hl-1">, (</span><span class="hl-2">stream</span><span class="hl-1">) </span><span class="hl-4">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-3">&#39;someone connected!&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">});</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">util</span><span class="hl-1">.</span><span class="hl-6">inspect</span><span class="hl-1">(</span><span class="hl-2">server</span><span class="hl-1">.</span><span class="hl-6">listeners</span><span class="hl-1">(</span><span class="hl-3">&#39;connection&#39;</span><span class="hl-1">)));</span><br/><span class="hl-7">// Prints: [ [Function] ]</span>
</code><button type="button">Copy</button></pre> </code><button type="button">Copy</button></pre>
</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="listeners.listeners-1.K-4" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">K</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">eventName</span>: <a href="../types/_internal_.Key.html" class="tsd-signature-type tsd-kind-type-alias">Key</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.ReadableStream.html#listeners.listeners-1.K-4">K</a><span class="tsd-signature-symbol">, </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.EventEmitter.html#T">T</a><span class="tsd-signature-symbol">&gt;</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <a href="../types/_internal_.Listener.html" class="tsd-signature-type tsd-kind-type-alias">Listener</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.ReadableStream.html#listeners.listeners-1.K-4">K</a><span class="tsd-signature-symbol">, </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.EventEmitter.html#T">T</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">Function</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">[]</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-5" class="tsd-anchor"></a>Since<a href="#Since-5" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.1.26</p> </div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="listeners.listeners-1.K-4" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">K</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">eventName</span>: <a href="../types/_internal_.Key.html" class="tsd-signature-type tsd-kind-type-alias">Key</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.ReadableStream.html#listeners.listeners-1.K-4">K</a><span class="tsd-signature-symbol">, </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.EventEmitter.html#T">T</a><span class="tsd-signature-symbol">&gt;</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <a href="../types/_internal_.Listener.html" class="tsd-signature-type tsd-kind-type-alias">Listener</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.ReadableStream.html#listeners.listeners-1.K-4">K</a><span class="tsd-signature-symbol">, </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.EventEmitter.html#T">T</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">Function</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">[]</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-5" class="tsd-anchor"></a>Since<a href="#Since-5" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.1.26</p>
@@ -49,13 +49,13 @@ in the list of the listeners of the event.</p>
named <code>eventName</code>. No checks are made to see if the <code>listener</code> has already named <code>eventName</code>. No checks are made to see if the <code>listener</code> has already
been added. Multiple calls passing the same combination of <code>eventName</code> and been added. Multiple calls passing the same combination of <code>eventName</code> and
<code>listener</code> will result in the <code>listener</code> being added, and called, multiple times.</p> <code>listener</code> will result in the <code>listener</code> being added, and called, multiple times.</p>
<pre><code class="js"><span class="hl-10">server</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;connection&#39;</span><span class="hl-1">, (</span><span class="hl-10">stream</span><span class="hl-1">) </span><span class="hl-8">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;someone connected!&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">});</span> <pre><code class="js"><span class="hl-2">server</span><span class="hl-1">.</span><span class="hl-6">on</span><span class="hl-1">(</span><span class="hl-3">&#39;connection&#39;</span><span class="hl-1">, (</span><span class="hl-2">stream</span><span class="hl-1">) </span><span class="hl-4">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-3">&#39;someone connected!&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">});</span>
</code><button type="button">Copy</button></pre> </code><button type="button">Copy</button></pre>
<p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p> <p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p>
<p>By default, event listeners are invoked in the order they are added. The <code>emitter.prependListener()</code> method can be used as an alternative to add the <p>By default, event listeners are invoked in the order they are added. The <code>emitter.prependListener()</code> method can be used as an alternative to add the
event listener to the beginning of the listeners array.</p> event listener to the beginning of the listeners array.</p>
<pre><code class="js"><span class="hl-9">import</span><span class="hl-1"> { </span><span class="hl-10">EventEmitter</span><span class="hl-1"> } </span><span class="hl-9">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><span class="hl-8">const</span><span class="hl-1"> </span><span class="hl-11">myEE</span><span class="hl-1"> = </span><span class="hl-8">new</span><span class="hl-1"> </span><span class="hl-0">EventEmitter</span><span class="hl-1">();</span><br/><span class="hl-10">myEE</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">, () </span><span class="hl-8">=&gt;</span><span class="hl-1"> </span><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;a&#39;</span><span class="hl-1">));</span><br/><span class="hl-10">myEE</span><span class="hl-1">.</span><span class="hl-0">prependListener</span><span class="hl-1">(</span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">, () </span><span class="hl-8">=&gt;</span><span class="hl-1"> </span><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;b&#39;</span><span class="hl-1">));</span><br/><span class="hl-10">myEE</span><span class="hl-1">.</span><span class="hl-0">emit</span><span class="hl-1">(</span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">);</span><br/><span class="hl-12">// Prints:</span><br/><span class="hl-12">// b</span><br/><span class="hl-12">// a</span> <pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">EventEmitter</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">myEE</span><span class="hl-1"> = </span><span class="hl-4">new</span><span class="hl-1"> </span><span class="hl-6">EventEmitter</span><span class="hl-1">();</span><br/><span class="hl-2">myEE</span><span class="hl-1">.</span><span class="hl-6">on</span><span class="hl-1">(</span><span class="hl-3">&#39;foo&#39;</span><span class="hl-1">, () </span><span class="hl-4">=&gt;</span><span class="hl-1"> </span><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-3">&#39;a&#39;</span><span class="hl-1">));</span><br/><span class="hl-2">myEE</span><span class="hl-1">.</span><span class="hl-6">prependListener</span><span class="hl-1">(</span><span class="hl-3">&#39;foo&#39;</span><span class="hl-1">, () </span><span class="hl-4">=&gt;</span><span class="hl-1"> </span><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-3">&#39;b&#39;</span><span class="hl-1">));</span><br/><span class="hl-2">myEE</span><span class="hl-1">.</span><span class="hl-6">emit</span><span class="hl-1">(</span><span class="hl-3">&#39;foo&#39;</span><span class="hl-1">);</span><br/><span class="hl-7">// Prints:</span><br/><span class="hl-7">// b</span><br/><span class="hl-7">// a</span>
</code><button type="button">Copy</button></pre> </code><button type="button">Copy</button></pre>
</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="on.on-1.K-6" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">K</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">eventName</span>: <a href="../types/_internal_.Key.html" class="tsd-signature-type tsd-kind-type-alias">Key</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.ReadableStream.html#on.on-1.K-6">K</a><span class="tsd-signature-symbol">, </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.EventEmitter.html#T">T</a><span class="tsd-signature-symbol">&gt;</span></span><div class="tsd-comment tsd-typography"><p>The name of the event.</p> </div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="on.on-1.K-6" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">K</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">eventName</span>: <a href="../types/_internal_.Key.html" class="tsd-signature-type tsd-kind-type-alias">Key</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.ReadableStream.html#on.on-1.K-6">K</a><span class="tsd-signature-symbol">, </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.EventEmitter.html#T">T</a><span class="tsd-signature-symbol">&gt;</span></span><div class="tsd-comment tsd-typography"><p>The name of the event.</p>
@@ -63,13 +63,13 @@ event listener to the beginning of the listeners array.</p>
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-7" class="tsd-anchor"></a>Since<a href="#Since-7" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.1.101</p> </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-7" class="tsd-anchor"></a>Since<a href="#Since-7" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.1.101</p>
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/events.d.ts:629</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="once" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>once</span><a href="#once" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="once.once-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">once</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.EventEmitter.html#once.once-1.K-7">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">eventName</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#once.once-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Adds a <strong>one-time</strong> <code>listener</code> function for the event named <code>eventName</code>. The </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/events.d.ts:629</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="once" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>once</span><a href="#once" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="once.once-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">once</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.EventEmitter.html#once.once-1.K-7">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">eventName</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#once.once-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Adds a <strong>one-time</strong> <code>listener</code> function for the event named <code>eventName</code>. The
next time <code>eventName</code> is triggered, this listener is removed and then invoked.</p> next time <code>eventName</code> is triggered, this listener is removed and then invoked.</p>
<pre><code class="js"><span class="hl-10">server</span><span class="hl-1">.</span><span class="hl-0">once</span><span class="hl-1">(</span><span class="hl-2">&#39;connection&#39;</span><span class="hl-1">, (</span><span class="hl-10">stream</span><span class="hl-1">) </span><span class="hl-8">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;Ah, we have our first user!&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">});</span> <pre><code class="js"><span class="hl-2">server</span><span class="hl-1">.</span><span class="hl-6">once</span><span class="hl-1">(</span><span class="hl-3">&#39;connection&#39;</span><span class="hl-1">, (</span><span class="hl-2">stream</span><span class="hl-1">) </span><span class="hl-4">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-3">&#39;Ah, we have our first user!&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">});</span>
</code><button type="button">Copy</button></pre> </code><button type="button">Copy</button></pre>
<p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p> <p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p>
<p>By default, event listeners are invoked in the order they are added. The <code>emitter.prependOnceListener()</code> method can be used as an alternative to add the <p>By default, event listeners are invoked in the order they are added. The <code>emitter.prependOnceListener()</code> method can be used as an alternative to add the
event listener to the beginning of the listeners array.</p> event listener to the beginning of the listeners array.</p>
<pre><code class="js"><span class="hl-9">import</span><span class="hl-1"> { </span><span class="hl-10">EventEmitter</span><span class="hl-1"> } </span><span class="hl-9">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><span class="hl-8">const</span><span class="hl-1"> </span><span class="hl-11">myEE</span><span class="hl-1"> = </span><span class="hl-8">new</span><span class="hl-1"> </span><span class="hl-0">EventEmitter</span><span class="hl-1">();</span><br/><span class="hl-10">myEE</span><span class="hl-1">.</span><span class="hl-0">once</span><span class="hl-1">(</span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">, () </span><span class="hl-8">=&gt;</span><span class="hl-1"> </span><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;a&#39;</span><span class="hl-1">));</span><br/><span class="hl-10">myEE</span><span class="hl-1">.</span><span class="hl-0">prependOnceListener</span><span class="hl-1">(</span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">, () </span><span class="hl-8">=&gt;</span><span class="hl-1"> </span><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;b&#39;</span><span class="hl-1">));</span><br/><span class="hl-10">myEE</span><span class="hl-1">.</span><span class="hl-0">emit</span><span class="hl-1">(</span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">);</span><br/><span class="hl-12">// Prints:</span><br/><span class="hl-12">// b</span><br/><span class="hl-12">// a</span> <pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">EventEmitter</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">myEE</span><span class="hl-1"> = </span><span class="hl-4">new</span><span class="hl-1"> </span><span class="hl-6">EventEmitter</span><span class="hl-1">();</span><br/><span class="hl-2">myEE</span><span class="hl-1">.</span><span class="hl-6">once</span><span class="hl-1">(</span><span class="hl-3">&#39;foo&#39;</span><span class="hl-1">, () </span><span class="hl-4">=&gt;</span><span class="hl-1"> </span><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-3">&#39;a&#39;</span><span class="hl-1">));</span><br/><span class="hl-2">myEE</span><span class="hl-1">.</span><span class="hl-6">prependOnceListener</span><span class="hl-1">(</span><span class="hl-3">&#39;foo&#39;</span><span class="hl-1">, () </span><span class="hl-4">=&gt;</span><span class="hl-1"> </span><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-3">&#39;b&#39;</span><span class="hl-1">));</span><br/><span class="hl-2">myEE</span><span class="hl-1">.</span><span class="hl-6">emit</span><span class="hl-1">(</span><span class="hl-3">&#39;foo&#39;</span><span class="hl-1">);</span><br/><span class="hl-7">// Prints:</span><br/><span class="hl-7">// b</span><br/><span class="hl-7">// a</span>
</code><button type="button">Copy</button></pre> </code><button type="button">Copy</button></pre>
</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="once.once-1.K-7" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">K</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">eventName</span>: <a href="../types/_internal_.Key.html" class="tsd-signature-type tsd-kind-type-alias">Key</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.ReadableStream.html#once.once-1.K-7">K</a><span class="tsd-signature-symbol">, </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.EventEmitter.html#T">T</a><span class="tsd-signature-symbol">&gt;</span></span><div class="tsd-comment tsd-typography"><p>The name of the event.</p> </div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="once.once-1.K-7" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">K</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">eventName</span>: <a href="../types/_internal_.Key.html" class="tsd-signature-type tsd-kind-type-alias">Key</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.ReadableStream.html#once.once-1.K-7">K</a><span class="tsd-signature-symbol">, </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.EventEmitter.html#T">T</a><span class="tsd-signature-symbol">&gt;</span></span><div class="tsd-comment tsd-typography"><p>The name of the event.</p>
@@ -79,7 +79,7 @@ event listener to the beginning of the listeners array.</p>
event named <code>eventName</code>. No checks are made to see if the <code>listener</code> has event named <code>eventName</code>. No checks are made to see if the <code>listener</code> has
already been added. Multiple calls passing the same combination of <code>eventName</code> already been added. Multiple calls passing the same combination of <code>eventName</code>
and <code>listener</code> will result in the <code>listener</code> being added, and called, multiple times.</p> and <code>listener</code> will result in the <code>listener</code> being added, and called, multiple times.</p>
<pre><code class="js"><span class="hl-10">server</span><span class="hl-1">.</span><span class="hl-0">prependListener</span><span class="hl-1">(</span><span class="hl-2">&#39;connection&#39;</span><span class="hl-1">, (</span><span class="hl-10">stream</span><span class="hl-1">) </span><span class="hl-8">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;someone connected!&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">});</span> <pre><code class="js"><span class="hl-2">server</span><span class="hl-1">.</span><span class="hl-6">prependListener</span><span class="hl-1">(</span><span class="hl-3">&#39;connection&#39;</span><span class="hl-1">, (</span><span class="hl-2">stream</span><span class="hl-1">) </span><span class="hl-4">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-3">&#39;someone connected!&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">});</span>
</code><button type="button">Copy</button></pre> </code><button type="button">Copy</button></pre>
<p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p> <p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p>
@@ -88,7 +88,7 @@ and <code>listener</code> will result in the <code>listener</code> being added,
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-9" class="tsd-anchor"></a>Since<a href="#Since-9" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v6.0.0</p> </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-9" class="tsd-anchor"></a>Since<a href="#Since-9" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v6.0.0</p>
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/events.d.ts:886</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="prependOnceListener" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>prepend<wbr/>Once<wbr/>Listener</span><a href="#prependOnceListener" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="prependOnceListener.prependOnceListener-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">prepend<wbr/>Once<wbr/>Listener</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.EventEmitter.html#prependOnceListener.prependOnceListener-1.K-9">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">eventName</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#prependOnceListener.prependOnceListener-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Adds a <strong>one-time</strong><code>listener</code> function for the event named <code>eventName</code> to the <em>beginning</em> of the listeners array. The next time <code>eventName</code> is triggered, this </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/events.d.ts:886</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="prependOnceListener" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>prepend<wbr/>Once<wbr/>Listener</span><a href="#prependOnceListener" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="prependOnceListener.prependOnceListener-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">prepend<wbr/>Once<wbr/>Listener</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.EventEmitter.html#prependOnceListener.prependOnceListener-1.K-9">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">eventName</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#prependOnceListener.prependOnceListener-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Adds a <strong>one-time</strong><code>listener</code> function for the event named <code>eventName</code> to the <em>beginning</em> of the listeners array. The next time <code>eventName</code> is triggered, this
listener is removed, and then invoked.</p> listener is removed, and then invoked.</p>
<pre><code class="js"><span class="hl-10">server</span><span class="hl-1">.</span><span class="hl-0">prependOnceListener</span><span class="hl-1">(</span><span class="hl-2">&#39;connection&#39;</span><span class="hl-1">, (</span><span class="hl-10">stream</span><span class="hl-1">) </span><span class="hl-8">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;Ah, we have our first user!&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">});</span> <pre><code class="js"><span class="hl-2">server</span><span class="hl-1">.</span><span class="hl-6">prependOnceListener</span><span class="hl-1">(</span><span class="hl-3">&#39;connection&#39;</span><span class="hl-1">, (</span><span class="hl-2">stream</span><span class="hl-1">) </span><span class="hl-4">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-3">&#39;Ah, we have our first user!&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">});</span>
</code><button type="button">Copy</button></pre> </code><button type="button">Copy</button></pre>
<p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p> <p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p>
@@ -97,7 +97,7 @@ listener is removed, and then invoked.</p>
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-10" class="tsd-anchor"></a>Since<a href="#Since-10" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v6.0.0</p> </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-10" class="tsd-anchor"></a>Since<a href="#Since-10" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v6.0.0</p>
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/events.d.ts:902</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="rawListeners" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>raw<wbr/>Listeners</span><a href="#rawListeners" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="rawListeners.rawListeners-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">raw<wbr/>Listeners</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.EventEmitter.html#rawListeners.rawListeners-1.K-10">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">eventName</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../types/_internal_.Listener.html" class="tsd-signature-type tsd-kind-type-alias">Listener</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.ReadableStream.html#rawListeners.rawListeners-1.K-10">K</a><span class="tsd-signature-symbol">, </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.EventEmitter.html#T">T</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">Function</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">[]</span><a href="#rawListeners.rawListeners-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns a copy of the array of listeners for the event named <code>eventName</code>, </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/events.d.ts:902</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="rawListeners" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>raw<wbr/>Listeners</span><a href="#rawListeners" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="rawListeners.rawListeners-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">raw<wbr/>Listeners</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.EventEmitter.html#rawListeners.rawListeners-1.K-10">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">eventName</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../types/_internal_.Listener.html" class="tsd-signature-type tsd-kind-type-alias">Listener</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.ReadableStream.html#rawListeners.rawListeners-1.K-10">K</a><span class="tsd-signature-symbol">, </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.EventEmitter.html#T">T</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">Function</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">[]</span><a href="#rawListeners.rawListeners-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns a copy of the array of listeners for the event named <code>eventName</code>,
including any wrappers (such as those created by <code>.once()</code>).</p> including any wrappers (such as those created by <code>.once()</code>).</p>
<pre><code class="js"><span class="hl-9">import</span><span class="hl-1"> { </span><span class="hl-10">EventEmitter</span><span class="hl-1"> } </span><span class="hl-9">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><span class="hl-8">const</span><span class="hl-1"> </span><span class="hl-11">emitter</span><span class="hl-1"> = </span><span class="hl-8">new</span><span class="hl-1"> </span><span class="hl-0">EventEmitter</span><span class="hl-1">();</span><br/><span class="hl-10">emitter</span><span class="hl-1">.</span><span class="hl-0">once</span><span class="hl-1">(</span><span class="hl-2">&#39;log&#39;</span><span class="hl-1">, () </span><span class="hl-8">=&gt;</span><span class="hl-1"> </span><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;log once&#39;</span><span class="hl-1">));</span><br/><br/><span class="hl-12">// Returns a new Array with a function `onceWrapper` which has a property</span><br/><span class="hl-12">// `listener` which contains the original listener bound above</span><br/><span class="hl-8">const</span><span class="hl-1"> </span><span class="hl-11">listeners</span><span class="hl-1"> = </span><span class="hl-10">emitter</span><span class="hl-1">.</span><span class="hl-0">rawListeners</span><span class="hl-1">(</span><span class="hl-2">&#39;log&#39;</span><span class="hl-1">);</span><br/><span class="hl-8">const</span><span class="hl-1"> </span><span class="hl-11">logFnWrapper</span><span class="hl-1"> = </span><span class="hl-10">listeners</span><span class="hl-1">[</span><span class="hl-13">0</span><span class="hl-1">];</span><br/><br/><span class="hl-12">// Logs &quot;log once&quot; to the console and does not unbind the `once` event</span><br/><span class="hl-10">logFnWrapper</span><span class="hl-1">.</span><span class="hl-0">listener</span><span class="hl-1">();</span><br/><br/><span class="hl-12">// Logs &quot;log once&quot; to the console and removes the listener</span><br/><span class="hl-0">logFnWrapper</span><span class="hl-1">();</span><br/><br/><span class="hl-10">emitter</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;log&#39;</span><span class="hl-1">, () </span><span class="hl-8">=&gt;</span><span class="hl-1"> </span><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;log persistently&#39;</span><span class="hl-1">));</span><br/><span class="hl-12">// Will return a new Array with a single function bound by `.on()` above</span><br/><span class="hl-8">const</span><span class="hl-1"> </span><span class="hl-11">newListeners</span><span class="hl-1"> = </span><span class="hl-10">emitter</span><span class="hl-1">.</span><span class="hl-0">rawListeners</span><span class="hl-1">(</span><span class="hl-2">&#39;log&#39;</span><span class="hl-1">);</span><br/><br/><span class="hl-12">// Logs &quot;log persistently&quot; twice</span><br/><span class="hl-10">newListeners</span><span class="hl-1">[</span><span class="hl-13">0</span><span class="hl-1">]();</span><br/><span class="hl-10">emitter</span><span class="hl-1">.</span><span class="hl-0">emit</span><span class="hl-1">(</span><span class="hl-2">&#39;log&#39;</span><span class="hl-1">);</span> <pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">EventEmitter</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">emitter</span><span class="hl-1"> = </span><span class="hl-4">new</span><span class="hl-1"> </span><span class="hl-6">EventEmitter</span><span class="hl-1">();</span><br/><span class="hl-2">emitter</span><span class="hl-1">.</span><span class="hl-6">once</span><span class="hl-1">(</span><span class="hl-3">&#39;log&#39;</span><span class="hl-1">, () </span><span class="hl-4">=&gt;</span><span class="hl-1"> </span><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-3">&#39;log once&#39;</span><span class="hl-1">));</span><br/><br/><span class="hl-7">// Returns a new Array with a function `onceWrapper` which has a property</span><br/><span class="hl-7">// `listener` which contains the original listener bound above</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">listeners</span><span class="hl-1"> = </span><span class="hl-2">emitter</span><span class="hl-1">.</span><span class="hl-6">rawListeners</span><span class="hl-1">(</span><span class="hl-3">&#39;log&#39;</span><span class="hl-1">);</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">logFnWrapper</span><span class="hl-1"> = </span><span class="hl-2">listeners</span><span class="hl-1">[</span><span class="hl-13">0</span><span class="hl-1">];</span><br/><br/><span class="hl-7">// Logs &quot;log once&quot; to the console and does not unbind the `once` event</span><br/><span class="hl-2">logFnWrapper</span><span class="hl-1">.</span><span class="hl-6">listener</span><span class="hl-1">();</span><br/><br/><span class="hl-7">// Logs &quot;log once&quot; to the console and removes the listener</span><br/><span class="hl-6">logFnWrapper</span><span class="hl-1">();</span><br/><br/><span class="hl-2">emitter</span><span class="hl-1">.</span><span class="hl-6">on</span><span class="hl-1">(</span><span class="hl-3">&#39;log&#39;</span><span class="hl-1">, () </span><span class="hl-4">=&gt;</span><span class="hl-1"> </span><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-3">&#39;log persistently&#39;</span><span class="hl-1">));</span><br/><span class="hl-7">// Will return a new Array with a single function bound by `.on()` above</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">newListeners</span><span class="hl-1"> = </span><span class="hl-2">emitter</span><span class="hl-1">.</span><span class="hl-6">rawListeners</span><span class="hl-1">(</span><span class="hl-3">&#39;log&#39;</span><span class="hl-1">);</span><br/><br/><span class="hl-7">// Logs &quot;log persistently&quot; twice</span><br/><span class="hl-2">newListeners</span><span class="hl-1">[</span><span class="hl-13">0</span><span class="hl-1">]();</span><br/><span class="hl-2">emitter</span><span class="hl-1">.</span><span class="hl-6">emit</span><span class="hl-1">(</span><span class="hl-3">&#39;log&#39;</span><span class="hl-1">);</span>
</code><button type="button">Copy</button></pre> </code><button type="button">Copy</button></pre>
</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="rawListeners.rawListeners-1.K-10" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">K</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">eventName</span>: <a href="../types/_internal_.Key.html" class="tsd-signature-type tsd-kind-type-alias">Key</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.ReadableStream.html#rawListeners.rawListeners-1.K-10">K</a><span class="tsd-signature-symbol">, </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.EventEmitter.html#T">T</a><span class="tsd-signature-symbol">&gt;</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <a href="../types/_internal_.Listener.html" class="tsd-signature-type tsd-kind-type-alias">Listener</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.ReadableStream.html#rawListeners.rawListeners-1.K-10">K</a><span class="tsd-signature-symbol">, </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.EventEmitter.html#T">T</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">Function</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">[]</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-11" class="tsd-anchor"></a>Since<a href="#Since-11" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v9.4.0</p> </div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="rawListeners.rawListeners-1.K-10" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">K</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">eventName</span>: <a href="../types/_internal_.Key.html" class="tsd-signature-type tsd-kind-type-alias">Key</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.ReadableStream.html#rawListeners.rawListeners-1.K-10">K</a><span class="tsd-signature-symbol">, </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.EventEmitter.html#T">T</a><span class="tsd-signature-symbol">&gt;</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <a href="../types/_internal_.Listener.html" class="tsd-signature-type tsd-kind-type-alias">Listener</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.ReadableStream.html#rawListeners.rawListeners-1.K-10">K</a><span class="tsd-signature-symbol">, </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.EventEmitter.html#T">T</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">Function</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">[]</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-11" class="tsd-anchor"></a>Since<a href="#Since-11" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v9.4.0</p>
@@ -108,7 +108,7 @@ component or module (e.g. sockets or file streams).</p>
<p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p> <p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">eventName</span>: <a href="../types/_internal_.Key.html" class="tsd-signature-type tsd-kind-type-alias">Key</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">, </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.EventEmitter.html#T">T</a><span class="tsd-signature-symbol">&gt;</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-12" class="tsd-anchor"></a>Since<a href="#Since-12" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.1.26</p> </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">eventName</span>: <a href="../types/_internal_.Key.html" class="tsd-signature-type tsd-kind-type-alias">Key</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">, </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.EventEmitter.html#T">T</a><span class="tsd-signature-symbol">&gt;</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-12" class="tsd-anchor"></a>Since<a href="#Since-12" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.1.26</p>
</div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/events.d.ts:758</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="removeListener" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>remove<wbr/>Listener</span><a href="#removeListener" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="removeListener.removeListener-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">remove<wbr/>Listener</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.EventEmitter.html#removeListener.removeListener-1.K-11">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">eventName</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#removeListener.removeListener-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Removes the specified <code>listener</code> from the listener array for the event named <code>eventName</code>.</p> </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/events.d.ts:758</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="removeListener" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>remove<wbr/>Listener</span><a href="#removeListener" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="removeListener.removeListener-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">remove<wbr/>Listener</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.EventEmitter.html#removeListener.removeListener-1.K-11">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">eventName</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#removeListener.removeListener-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Removes the specified <code>listener</code> from the listener array for the event named <code>eventName</code>.</p>
<pre><code class="js"><span class="hl-8">const</span><span class="hl-1"> </span><span class="hl-0">callback</span><span class="hl-1"> = (</span><span class="hl-10">stream</span><span class="hl-1">) </span><span class="hl-8">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;someone connected!&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">};</span><br/><span class="hl-10">server</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;connection&#39;</span><span class="hl-1">, </span><span class="hl-10">callback</span><span class="hl-1">);</span><br/><span class="hl-12">// ...</span><br/><span class="hl-10">server</span><span class="hl-1">.</span><span class="hl-0">removeListener</span><span class="hl-1">(</span><span class="hl-2">&#39;connection&#39;</span><span class="hl-1">, </span><span class="hl-10">callback</span><span class="hl-1">);</span> <pre><code class="js"><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-6">callback</span><span class="hl-1"> = (</span><span class="hl-2">stream</span><span class="hl-1">) </span><span class="hl-4">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-3">&#39;someone connected!&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">};</span><br/><span class="hl-2">server</span><span class="hl-1">.</span><span class="hl-6">on</span><span class="hl-1">(</span><span class="hl-3">&#39;connection&#39;</span><span class="hl-1">, </span><span class="hl-2">callback</span><span class="hl-1">);</span><br/><span class="hl-7">// ...</span><br/><span class="hl-2">server</span><span class="hl-1">.</span><span class="hl-6">removeListener</span><span class="hl-1">(</span><span class="hl-3">&#39;connection&#39;</span><span class="hl-1">, </span><span class="hl-2">callback</span><span class="hl-1">);</span>
</code><button type="button">Copy</button></pre> </code><button type="button">Copy</button></pre>
<p><code>removeListener()</code> will remove, at most, one instance of a listener from the <p><code>removeListener()</code> will remove, at most, one instance of a listener from the
@@ -118,7 +118,7 @@ called multiple times to remove each instance.</p>
<p>Once an event is emitted, all listeners attached to it at the <p>Once an event is emitted, all listeners attached to it at the
time of emitting are called in order. This implies that any <code>removeListener()</code> or <code>removeAllListeners()</code> calls <em>after</em> emitting and <em>before</em> the last listener finishes execution time of emitting are called in order. This implies that any <code>removeListener()</code> or <code>removeAllListeners()</code> calls <em>after</em> emitting and <em>before</em> the last listener finishes execution
will not remove them from<code>emit()</code> in progress. Subsequent events behave as expected.</p> will not remove them from<code>emit()</code> in progress. Subsequent events behave as expected.</p>
<pre><code class="js"><span class="hl-9">import</span><span class="hl-1"> { </span><span class="hl-10">EventEmitter</span><span class="hl-1"> } </span><span class="hl-9">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><span class="hl-8">class</span><span class="hl-1"> </span><span class="hl-15">MyEmitter</span><span class="hl-1"> </span><span class="hl-8">extends</span><span class="hl-1"> </span><span class="hl-15">EventEmitter</span><span class="hl-1"> {}</span><br/><span class="hl-8">const</span><span class="hl-1"> </span><span class="hl-11">myEmitter</span><span class="hl-1"> = </span><span class="hl-8">new</span><span class="hl-1"> </span><span class="hl-0">MyEmitter</span><span class="hl-1">();</span><br/><br/><span class="hl-8">const</span><span class="hl-1"> </span><span class="hl-0">callbackA</span><span class="hl-1"> = () </span><span class="hl-8">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;A&#39;</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-10">myEmitter</span><span class="hl-1">.</span><span class="hl-0">removeListener</span><span class="hl-1">(</span><span class="hl-2">&#39;event&#39;</span><span class="hl-1">, </span><span class="hl-10">callbackB</span><span class="hl-1">);</span><br/><span class="hl-1">};</span><br/><br/><span class="hl-8">const</span><span class="hl-1"> </span><span class="hl-0">callbackB</span><span class="hl-1"> = () </span><span class="hl-8">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;B&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">};</span><br/><br/><span class="hl-10">myEmitter</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;event&#39;</span><span class="hl-1">, </span><span class="hl-10">callbackA</span><span class="hl-1">);</span><br/><br/><span class="hl-10">myEmitter</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;event&#39;</span><span class="hl-1">, </span><span class="hl-10">callbackB</span><span class="hl-1">);</span><br/><br/><span class="hl-12">// callbackA removes listener callbackB but it will still be called.</span><br/><span class="hl-12">// Internal listener array at time of emit [callbackA, callbackB]</span><br/><span class="hl-10">myEmitter</span><span class="hl-1">.</span><span class="hl-0">emit</span><span class="hl-1">(</span><span class="hl-2">&#39;event&#39;</span><span class="hl-1">);</span><br/><span class="hl-12">// Prints:</span><br/><span class="hl-12">// A</span><br/><span class="hl-12">// B</span><br/><br/><span class="hl-12">// callbackB is now removed.</span><br/><span class="hl-12">// Internal listener array [callbackA]</span><br/><span class="hl-10">myEmitter</span><span class="hl-1">.</span><span class="hl-0">emit</span><span class="hl-1">(</span><span class="hl-2">&#39;event&#39;</span><span class="hl-1">);</span><br/><span class="hl-12">// Prints:</span><br/><span class="hl-12">// A</span> <pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">EventEmitter</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><span class="hl-4">class</span><span class="hl-1"> </span><span class="hl-15">MyEmitter</span><span class="hl-1"> </span><span class="hl-4">extends</span><span class="hl-1"> </span><span class="hl-15">EventEmitter</span><span class="hl-1"> {}</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">myEmitter</span><span class="hl-1"> = </span><span class="hl-4">new</span><span class="hl-1"> </span><span class="hl-6">MyEmitter</span><span class="hl-1">();</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-6">callbackA</span><span class="hl-1"> = () </span><span class="hl-4">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-3">&#39;A&#39;</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-2">myEmitter</span><span class="hl-1">.</span><span class="hl-6">removeListener</span><span class="hl-1">(</span><span class="hl-3">&#39;event&#39;</span><span class="hl-1">, </span><span class="hl-2">callbackB</span><span class="hl-1">);</span><br/><span class="hl-1">};</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-6">callbackB</span><span class="hl-1"> = () </span><span class="hl-4">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-3">&#39;B&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">};</span><br/><br/><span class="hl-2">myEmitter</span><span class="hl-1">.</span><span class="hl-6">on</span><span class="hl-1">(</span><span class="hl-3">&#39;event&#39;</span><span class="hl-1">, </span><span class="hl-2">callbackA</span><span class="hl-1">);</span><br/><br/><span class="hl-2">myEmitter</span><span class="hl-1">.</span><span class="hl-6">on</span><span class="hl-1">(</span><span class="hl-3">&#39;event&#39;</span><span class="hl-1">, </span><span class="hl-2">callbackB</span><span class="hl-1">);</span><br/><br/><span class="hl-7">// callbackA removes listener callbackB but it will still be called.</span><br/><span class="hl-7">// Internal listener array at time of emit [callbackA, callbackB]</span><br/><span class="hl-2">myEmitter</span><span class="hl-1">.</span><span class="hl-6">emit</span><span class="hl-1">(</span><span class="hl-3">&#39;event&#39;</span><span class="hl-1">);</span><br/><span class="hl-7">// Prints:</span><br/><span class="hl-7">// A</span><br/><span class="hl-7">// B</span><br/><br/><span class="hl-7">// callbackB is now removed.</span><br/><span class="hl-7">// Internal listener array [callbackA]</span><br/><span class="hl-2">myEmitter</span><span class="hl-1">.</span><span class="hl-6">emit</span><span class="hl-1">(</span><span class="hl-3">&#39;event&#39;</span><span class="hl-1">);</span><br/><span class="hl-7">// Prints:</span><br/><span class="hl-7">// A</span>
</code><button type="button">Copy</button></pre> </code><button type="button">Copy</button></pre>
<p>Because listeners are managed using an internal array, calling this will <p>Because listeners are managed using an internal array, calling this will
@@ -129,7 +129,7 @@ the <code>emitter.listeners()</code> method will need to be recreated.</p>
<p>When a single function has been added as a handler multiple times for a single <p>When a single function has been added as a handler multiple times for a single
event (as in the example below), <code>removeListener()</code> will remove the most event (as in the example below), <code>removeListener()</code> will remove the most
recently added instance. In the example the <code>once('ping')</code> listener is removed:</p> recently added instance. In the example the <code>once('ping')</code> listener is removed:</p>
<pre><code class="js"><span class="hl-9">import</span><span class="hl-1"> { </span><span class="hl-10">EventEmitter</span><span class="hl-1"> } </span><span class="hl-9">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><span class="hl-8">const</span><span class="hl-1"> </span><span class="hl-11">ee</span><span class="hl-1"> = </span><span class="hl-8">new</span><span class="hl-1"> </span><span class="hl-0">EventEmitter</span><span class="hl-1">();</span><br/><br/><span class="hl-8">function</span><span class="hl-1"> </span><span class="hl-0">pong</span><span class="hl-1">() {</span><br/><span class="hl-1"> </span><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;pong&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">}</span><br/><br/><span class="hl-10">ee</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;ping&#39;</span><span class="hl-1">, </span><span class="hl-10">pong</span><span class="hl-1">);</span><br/><span class="hl-10">ee</span><span class="hl-1">.</span><span class="hl-0">once</span><span class="hl-1">(</span><span class="hl-2">&#39;ping&#39;</span><span class="hl-1">, </span><span class="hl-10">pong</span><span class="hl-1">);</span><br/><span class="hl-10">ee</span><span class="hl-1">.</span><span class="hl-0">removeListener</span><span class="hl-1">(</span><span class="hl-2">&#39;ping&#39;</span><span class="hl-1">, </span><span class="hl-10">pong</span><span class="hl-1">);</span><br/><br/><span class="hl-10">ee</span><span class="hl-1">.</span><span class="hl-0">emit</span><span class="hl-1">(</span><span class="hl-2">&#39;ping&#39;</span><span class="hl-1">);</span><br/><span class="hl-10">ee</span><span class="hl-1">.</span><span class="hl-0">emit</span><span class="hl-1">(</span><span class="hl-2">&#39;ping&#39;</span><span class="hl-1">);</span> <pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">EventEmitter</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">ee</span><span class="hl-1"> = </span><span class="hl-4">new</span><span class="hl-1"> </span><span class="hl-6">EventEmitter</span><span class="hl-1">();</span><br/><br/><span class="hl-4">function</span><span class="hl-1"> </span><span class="hl-6">pong</span><span class="hl-1">() {</span><br/><span class="hl-1"> </span><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-3">&#39;pong&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">}</span><br/><br/><span class="hl-2">ee</span><span class="hl-1">.</span><span class="hl-6">on</span><span class="hl-1">(</span><span class="hl-3">&#39;ping&#39;</span><span class="hl-1">, </span><span class="hl-2">pong</span><span class="hl-1">);</span><br/><span class="hl-2">ee</span><span class="hl-1">.</span><span class="hl-6">once</span><span class="hl-1">(</span><span class="hl-3">&#39;ping&#39;</span><span class="hl-1">, </span><span class="hl-2">pong</span><span class="hl-1">);</span><br/><span class="hl-2">ee</span><span class="hl-1">.</span><span class="hl-6">removeListener</span><span class="hl-1">(</span><span class="hl-3">&#39;ping&#39;</span><span class="hl-1">, </span><span class="hl-2">pong</span><span class="hl-1">);</span><br/><br/><span class="hl-2">ee</span><span class="hl-1">.</span><span class="hl-6">emit</span><span class="hl-1">(</span><span class="hl-3">&#39;ping&#39;</span><span class="hl-1">);</span><br/><span class="hl-2">ee</span><span class="hl-1">.</span><span class="hl-6">emit</span><span class="hl-1">(</span><span class="hl-3">&#39;ping&#39;</span><span class="hl-1">);</span>
</code><button type="button">Copy</button></pre> </code><button type="button">Copy</button></pre>
<p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p> <p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p>
+13 -13
View File
@@ -30,13 +30,13 @@
</div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.EventEmitter.html">EventEmitter</a>.<a href="_internal_.EventEmitter.html#addListener">addListener</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:597</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="emit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>emit</span><a href="#emit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="emit.emit-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">emit</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.ReadableStream.html#emit.emit-1.K-2">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">eventName</span>, <span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#emit.emit-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Synchronously calls each of the listeners registered for the event named <code>eventName</code>, in the order they were registered, passing the supplied arguments </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.EventEmitter.html">EventEmitter</a>.<a href="_internal_.EventEmitter.html#addListener">addListener</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:597</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="emit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>emit</span><a href="#emit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="emit.emit-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">emit</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.ReadableStream.html#emit.emit-1.K-2">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">eventName</span>, <span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#emit.emit-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Synchronously calls each of the listeners registered for the event named <code>eventName</code>, in the order they were registered, passing the supplied arguments
to each.</p> to each.</p>
<p>Returns <code>true</code> if the event had listeners, <code>false</code> otherwise.</p> <p>Returns <code>true</code> if the event had listeners, <code>false</code> otherwise.</p>
<pre><code class="js"><span class="hl-9">import</span><span class="hl-1"> { </span><span class="hl-10">EventEmitter</span><span class="hl-1"> } </span><span class="hl-9">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><span class="hl-8">const</span><span class="hl-1"> </span><span class="hl-11">myEmitter</span><span class="hl-1"> = </span><span class="hl-8">new</span><span class="hl-1"> </span><span class="hl-0">EventEmitter</span><span class="hl-1">();</span><br/><br/><span class="hl-12">// First listener</span><br/><span class="hl-10">myEmitter</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;event&#39;</span><span class="hl-1">, </span><span class="hl-8">function</span><span class="hl-1"> </span><span class="hl-0">firstListener</span><span class="hl-1">() {</span><br/><span class="hl-1"> </span><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;Helloooo! first listener&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">});</span><br/><span class="hl-12">// Second listener</span><br/><span class="hl-10">myEmitter</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;event&#39;</span><span class="hl-1">, </span><span class="hl-8">function</span><span class="hl-1"> </span><span class="hl-0">secondListener</span><span class="hl-1">(</span><span class="hl-10">arg1</span><span class="hl-1">, </span><span class="hl-10">arg2</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">`event with parameters </span><span class="hl-8">${</span><span class="hl-10">arg1</span><span class="hl-8">}</span><span class="hl-2">, </span><span class="hl-8">${</span><span class="hl-10">arg2</span><span class="hl-8">}</span><span class="hl-2"> in second listener`</span><span class="hl-1">);</span><br/><span class="hl-1">});</span><br/><span class="hl-12">// Third listener</span><br/><span class="hl-10">myEmitter</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;event&#39;</span><span class="hl-1">, </span><span class="hl-8">function</span><span class="hl-1"> </span><span class="hl-0">thirdListener</span><span class="hl-1">(...</span><span class="hl-10">args</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-8">const</span><span class="hl-1"> </span><span class="hl-11">parameters</span><span class="hl-1"> = </span><span class="hl-10">args</span><span class="hl-1">.</span><span class="hl-0">join</span><span class="hl-1">(</span><span class="hl-2">&#39;, &#39;</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">`event with parameters </span><span class="hl-8">${</span><span class="hl-10">parameters</span><span class="hl-8">}</span><span class="hl-2"> in third listener`</span><span class="hl-1">);</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-10">myEmitter</span><span class="hl-1">.</span><span class="hl-0">listeners</span><span class="hl-1">(</span><span class="hl-2">&#39;event&#39;</span><span class="hl-1">));</span><br/><br/><span class="hl-10">myEmitter</span><span class="hl-1">.</span><span class="hl-0">emit</span><span class="hl-1">(</span><span class="hl-2">&#39;event&#39;</span><span class="hl-1">, </span><span class="hl-13">1</span><span class="hl-1">, </span><span class="hl-13">2</span><span class="hl-1">, </span><span class="hl-13">3</span><span class="hl-1">, </span><span class="hl-13">4</span><span class="hl-1">, </span><span class="hl-13">5</span><span class="hl-1">);</span><br/><br/><span class="hl-12">// Prints:</span><br/><span class="hl-12">// [</span><br/><span class="hl-12">// [Function: firstListener],</span><br/><span class="hl-12">// [Function: secondListener],</span><br/><span class="hl-12">// [Function: thirdListener]</span><br/><span class="hl-12">// ]</span><br/><span class="hl-12">// Helloooo! first listener</span><br/><span class="hl-12">// event with parameters 1, 2 in second listener</span><br/><span class="hl-12">// event with parameters 1, 2, 3, 4, 5 in third listener</span> <pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">EventEmitter</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">myEmitter</span><span class="hl-1"> = </span><span class="hl-4">new</span><span class="hl-1"> </span><span class="hl-6">EventEmitter</span><span class="hl-1">();</span><br/><br/><span class="hl-7">// First listener</span><br/><span class="hl-2">myEmitter</span><span class="hl-1">.</span><span class="hl-6">on</span><span class="hl-1">(</span><span class="hl-3">&#39;event&#39;</span><span class="hl-1">, </span><span class="hl-4">function</span><span class="hl-1"> </span><span class="hl-6">firstListener</span><span class="hl-1">() {</span><br/><span class="hl-1"> </span><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-3">&#39;Helloooo! first listener&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">});</span><br/><span class="hl-7">// Second listener</span><br/><span class="hl-2">myEmitter</span><span class="hl-1">.</span><span class="hl-6">on</span><span class="hl-1">(</span><span class="hl-3">&#39;event&#39;</span><span class="hl-1">, </span><span class="hl-4">function</span><span class="hl-1"> </span><span class="hl-6">secondListener</span><span class="hl-1">(</span><span class="hl-2">arg1</span><span class="hl-1">, </span><span class="hl-2">arg2</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-3">`event with parameters </span><span class="hl-4">${</span><span class="hl-2">arg1</span><span class="hl-4">}</span><span class="hl-3">, </span><span class="hl-4">${</span><span class="hl-2">arg2</span><span class="hl-4">}</span><span class="hl-3"> in second listener`</span><span class="hl-1">);</span><br/><span class="hl-1">});</span><br/><span class="hl-7">// Third listener</span><br/><span class="hl-2">myEmitter</span><span class="hl-1">.</span><span class="hl-6">on</span><span class="hl-1">(</span><span class="hl-3">&#39;event&#39;</span><span class="hl-1">, </span><span class="hl-4">function</span><span class="hl-1"> </span><span class="hl-6">thirdListener</span><span class="hl-1">(...</span><span class="hl-2">args</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">parameters</span><span class="hl-1"> = </span><span class="hl-2">args</span><span class="hl-1">.</span><span class="hl-6">join</span><span class="hl-1">(</span><span class="hl-3">&#39;, &#39;</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-3">`event with parameters </span><span class="hl-4">${</span><span class="hl-2">parameters</span><span class="hl-4">}</span><span class="hl-3"> in third listener`</span><span class="hl-1">);</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">myEmitter</span><span class="hl-1">.</span><span class="hl-6">listeners</span><span class="hl-1">(</span><span class="hl-3">&#39;event&#39;</span><span class="hl-1">));</span><br/><br/><span class="hl-2">myEmitter</span><span class="hl-1">.</span><span class="hl-6">emit</span><span class="hl-1">(</span><span class="hl-3">&#39;event&#39;</span><span class="hl-1">, </span><span class="hl-13">1</span><span class="hl-1">, </span><span class="hl-13">2</span><span class="hl-1">, </span><span class="hl-13">3</span><span class="hl-1">, </span><span class="hl-13">4</span><span class="hl-1">, </span><span class="hl-13">5</span><span class="hl-1">);</span><br/><br/><span class="hl-7">// Prints:</span><br/><span class="hl-7">// [</span><br/><span class="hl-7">// [Function: firstListener],</span><br/><span class="hl-7">// [Function: secondListener],</span><br/><span class="hl-7">// [Function: thirdListener]</span><br/><span class="hl-7">// ]</span><br/><span class="hl-7">// Helloooo! first listener</span><br/><span class="hl-7">// event with parameters 1, 2 in second listener</span><br/><span class="hl-7">// event with parameters 1, 2, 3, 4, 5 in third listener</span>
</code><button type="button">Copy</button></pre> </code><button type="button">Copy</button></pre>
</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="emit.emit-1.K-2" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">K</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">eventName</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></span></li><li><span><code class="tsd-tag">Rest</code><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span>: <a href="../types/_internal_.AnyRest.html" class="tsd-signature-type tsd-kind-type-alias">AnyRest</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-1" class="tsd-anchor"></a>Since<a href="#Since-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.1.26</p> </div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="emit.emit-1.K-2" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">K</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">eventName</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></span></li><li><span><code class="tsd-tag">Rest</code><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span>: <a href="../types/_internal_.AnyRest.html" class="tsd-signature-type tsd-kind-type-alias">AnyRest</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-1" class="tsd-anchor"></a>Since<a href="#Since-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.1.26</p>
</div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.EventEmitter.html">EventEmitter</a>.<a href="_internal_.EventEmitter.html#emit">emit</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:859</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="eventNames" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>event<wbr/>Names</span><a href="#eventNames" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="eventNames.eventNames-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">event<wbr/>Names</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span><a href="#eventNames.eventNames-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns an array listing the events for which the emitter has registered </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.EventEmitter.html">EventEmitter</a>.<a href="_internal_.EventEmitter.html#emit">emit</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:859</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="eventNames" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>event<wbr/>Names</span><a href="#eventNames" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="eventNames.eventNames-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">event<wbr/>Names</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span><a href="#eventNames.eventNames-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns an array listing the events for which the emitter has registered
listeners. The values in the array are strings or <code>Symbol</code>s.</p> listeners. The values in the array are strings or <code>Symbol</code>s.</p>
<pre><code class="js"><span class="hl-9">import</span><span class="hl-1"> { </span><span class="hl-10">EventEmitter</span><span class="hl-1"> } </span><span class="hl-9">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-8">const</span><span class="hl-1"> </span><span class="hl-11">myEE</span><span class="hl-1"> = </span><span class="hl-8">new</span><span class="hl-1"> </span><span class="hl-0">EventEmitter</span><span class="hl-1">();</span><br/><span class="hl-10">myEE</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">, () </span><span class="hl-8">=&gt;</span><span class="hl-1"> {});</span><br/><span class="hl-10">myEE</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;bar&#39;</span><span class="hl-1">, () </span><span class="hl-8">=&gt;</span><span class="hl-1"> {});</span><br/><br/><span class="hl-8">const</span><span class="hl-1"> </span><span class="hl-11">sym</span><span class="hl-1"> = </span><span class="hl-0">Symbol</span><span class="hl-1">(</span><span class="hl-2">&#39;symbol&#39;</span><span class="hl-1">);</span><br/><span class="hl-10">myEE</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-10">sym</span><span class="hl-1">, () </span><span class="hl-8">=&gt;</span><span class="hl-1"> {});</span><br/><br/><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-10">myEE</span><span class="hl-1">.</span><span class="hl-0">eventNames</span><span class="hl-1">());</span><br/><span class="hl-12">// Prints: [ &#39;foo&#39;, &#39;bar&#39;, Symbol(symbol) ]</span> <pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">EventEmitter</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">myEE</span><span class="hl-1"> = </span><span class="hl-4">new</span><span class="hl-1"> </span><span class="hl-6">EventEmitter</span><span class="hl-1">();</span><br/><span class="hl-2">myEE</span><span class="hl-1">.</span><span class="hl-6">on</span><span class="hl-1">(</span><span class="hl-3">&#39;foo&#39;</span><span class="hl-1">, () </span><span class="hl-4">=&gt;</span><span class="hl-1"> {});</span><br/><span class="hl-2">myEE</span><span class="hl-1">.</span><span class="hl-6">on</span><span class="hl-1">(</span><span class="hl-3">&#39;bar&#39;</span><span class="hl-1">, () </span><span class="hl-4">=&gt;</span><span class="hl-1"> {});</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">sym</span><span class="hl-1"> = </span><span class="hl-6">Symbol</span><span class="hl-1">(</span><span class="hl-3">&#39;symbol&#39;</span><span class="hl-1">);</span><br/><span class="hl-2">myEE</span><span class="hl-1">.</span><span class="hl-6">on</span><span class="hl-1">(</span><span class="hl-2">sym</span><span class="hl-1">, () </span><span class="hl-4">=&gt;</span><span class="hl-1"> {});</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">myEE</span><span class="hl-1">.</span><span class="hl-6">eventNames</span><span class="hl-1">());</span><br/><span class="hl-7">// Prints: [ &#39;foo&#39;, &#39;bar&#39;, Symbol(symbol) ]</span>
</code><button type="button">Copy</button></pre> </code><button type="button">Copy</button></pre>
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-2" class="tsd-anchor"></a>Since<a href="#Since-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v6.0.0</p> </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-2" class="tsd-anchor"></a>Since<a href="#Since-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v6.0.0</p>
@@ -50,7 +50,7 @@ in the list of the listeners of the event.</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-type">Function</span></span><div class="tsd-comment tsd-typography"><p>The event handler function</p> </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-type">Function</span></span><div class="tsd-comment tsd-typography"><p>The event handler function</p>
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-4" class="tsd-anchor"></a>Since<a href="#Since-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v3.2.0</p> </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-4" class="tsd-anchor"></a>Since<a href="#Since-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v3.2.0</p>
</div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.EventEmitter.html">EventEmitter</a>.<a href="_internal_.EventEmitter.html#listenerCount">listenerCount</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:868</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="listeners" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>listeners</span><a href="#listeners" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="listeners.listeners-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">listeners</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.ReadableStream.html#listeners.listeners-1.K-4">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">eventName</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Function</span><span class="tsd-signature-symbol">[]</span><a href="#listeners.listeners-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns a copy of the array of listeners for the event named <code>eventName</code>.</p> </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.EventEmitter.html">EventEmitter</a>.<a href="_internal_.EventEmitter.html#listenerCount">listenerCount</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:868</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="listeners" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>listeners</span><a href="#listeners" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="listeners.listeners-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">listeners</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.ReadableStream.html#listeners.listeners-1.K-4">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">eventName</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Function</span><span class="tsd-signature-symbol">[]</span><a href="#listeners.listeners-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns a copy of the array of listeners for the event named <code>eventName</code>.</p>
<pre><code class="js"><span class="hl-10">server</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;connection&#39;</span><span class="hl-1">, (</span><span class="hl-10">stream</span><span class="hl-1">) </span><span class="hl-8">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;someone connected!&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">});</span><br/><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-10">util</span><span class="hl-1">.</span><span class="hl-0">inspect</span><span class="hl-1">(</span><span class="hl-10">server</span><span class="hl-1">.</span><span class="hl-0">listeners</span><span class="hl-1">(</span><span class="hl-2">&#39;connection&#39;</span><span class="hl-1">)));</span><br/><span class="hl-12">// Prints: [ [Function] ]</span> <pre><code class="js"><span class="hl-2">server</span><span class="hl-1">.</span><span class="hl-6">on</span><span class="hl-1">(</span><span class="hl-3">&#39;connection&#39;</span><span class="hl-1">, (</span><span class="hl-2">stream</span><span class="hl-1">) </span><span class="hl-4">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-3">&#39;someone connected!&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">});</span><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-2">util</span><span class="hl-1">.</span><span class="hl-6">inspect</span><span class="hl-1">(</span><span class="hl-2">server</span><span class="hl-1">.</span><span class="hl-6">listeners</span><span class="hl-1">(</span><span class="hl-3">&#39;connection&#39;</span><span class="hl-1">)));</span><br/><span class="hl-7">// Prints: [ [Function] ]</span>
</code><button type="button">Copy</button></pre> </code><button type="button">Copy</button></pre>
</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="listeners.listeners-1.K-4" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">K</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">eventName</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Function</span><span class="tsd-signature-symbol">[]</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-5" class="tsd-anchor"></a>Since<a href="#Since-5" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.1.26</p> </div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="listeners.listeners-1.K-4" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">K</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">eventName</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Function</span><span class="tsd-signature-symbol">[]</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-5" class="tsd-anchor"></a>Since<a href="#Since-5" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.1.26</p>
@@ -60,13 +60,13 @@ in the list of the listeners of the event.</p>
named <code>eventName</code>. No checks are made to see if the <code>listener</code> has already named <code>eventName</code>. No checks are made to see if the <code>listener</code> has already
been added. Multiple calls passing the same combination of <code>eventName</code> and been added. Multiple calls passing the same combination of <code>eventName</code> and
<code>listener</code> will result in the <code>listener</code> being added, and called, multiple times.</p> <code>listener</code> will result in the <code>listener</code> being added, and called, multiple times.</p>
<pre><code class="js"><span class="hl-10">server</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;connection&#39;</span><span class="hl-1">, (</span><span class="hl-10">stream</span><span class="hl-1">) </span><span class="hl-8">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;someone connected!&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">});</span> <pre><code class="js"><span class="hl-2">server</span><span class="hl-1">.</span><span class="hl-6">on</span><span class="hl-1">(</span><span class="hl-3">&#39;connection&#39;</span><span class="hl-1">, (</span><span class="hl-2">stream</span><span class="hl-1">) </span><span class="hl-4">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-3">&#39;someone connected!&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">});</span>
</code><button type="button">Copy</button></pre> </code><button type="button">Copy</button></pre>
<p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p> <p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p>
<p>By default, event listeners are invoked in the order they are added. The <code>emitter.prependListener()</code> method can be used as an alternative to add the <p>By default, event listeners are invoked in the order they are added. The <code>emitter.prependListener()</code> method can be used as an alternative to add the
event listener to the beginning of the listeners array.</p> event listener to the beginning of the listeners array.</p>
<pre><code class="js"><span class="hl-9">import</span><span class="hl-1"> { </span><span class="hl-10">EventEmitter</span><span class="hl-1"> } </span><span class="hl-9">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><span class="hl-8">const</span><span class="hl-1"> </span><span class="hl-11">myEE</span><span class="hl-1"> = </span><span class="hl-8">new</span><span class="hl-1"> </span><span class="hl-0">EventEmitter</span><span class="hl-1">();</span><br/><span class="hl-10">myEE</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">, () </span><span class="hl-8">=&gt;</span><span class="hl-1"> </span><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;a&#39;</span><span class="hl-1">));</span><br/><span class="hl-10">myEE</span><span class="hl-1">.</span><span class="hl-0">prependListener</span><span class="hl-1">(</span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">, () </span><span class="hl-8">=&gt;</span><span class="hl-1"> </span><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;b&#39;</span><span class="hl-1">));</span><br/><span class="hl-10">myEE</span><span class="hl-1">.</span><span class="hl-0">emit</span><span class="hl-1">(</span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">);</span><br/><span class="hl-12">// Prints:</span><br/><span class="hl-12">// b</span><br/><span class="hl-12">// a</span> <pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">EventEmitter</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">myEE</span><span class="hl-1"> = </span><span class="hl-4">new</span><span class="hl-1"> </span><span class="hl-6">EventEmitter</span><span class="hl-1">();</span><br/><span class="hl-2">myEE</span><span class="hl-1">.</span><span class="hl-6">on</span><span class="hl-1">(</span><span class="hl-3">&#39;foo&#39;</span><span class="hl-1">, () </span><span class="hl-4">=&gt;</span><span class="hl-1"> </span><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-3">&#39;a&#39;</span><span class="hl-1">));</span><br/><span class="hl-2">myEE</span><span class="hl-1">.</span><span class="hl-6">prependListener</span><span class="hl-1">(</span><span class="hl-3">&#39;foo&#39;</span><span class="hl-1">, () </span><span class="hl-4">=&gt;</span><span class="hl-1"> </span><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-3">&#39;b&#39;</span><span class="hl-1">));</span><br/><span class="hl-2">myEE</span><span class="hl-1">.</span><span class="hl-6">emit</span><span class="hl-1">(</span><span class="hl-3">&#39;foo&#39;</span><span class="hl-1">);</span><br/><span class="hl-7">// Prints:</span><br/><span class="hl-7">// b</span><br/><span class="hl-7">// a</span>
</code><button type="button">Copy</button></pre> </code><button type="button">Copy</button></pre>
</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="on.on-1.K-6" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">K</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">eventName</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></span><div class="tsd-comment tsd-typography"><p>The name of the event.</p> </div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="on.on-1.K-6" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">K</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">eventName</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></span><div class="tsd-comment tsd-typography"><p>The name of the event.</p>
@@ -74,13 +74,13 @@ event listener to the beginning of the listeners array.</p>
</div><div class="tsd-comment tsd-typography"></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag">Rest</code><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span>: <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-7" class="tsd-anchor"></a>Since<a href="#Since-7" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.1.101</p> </div><div class="tsd-comment tsd-typography"></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag">Rest</code><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span>: <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-7" class="tsd-anchor"></a>Since<a href="#Since-7" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.1.101</p>
</div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.EventEmitter.html">EventEmitter</a>.<a href="_internal_.EventEmitter.html#on">on</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:629</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="once" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>once</span><a href="#once" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="once.once-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">once</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.ReadableStream.html#once.once-1.K-7">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">eventName</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#once.once-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Adds a <strong>one-time</strong> <code>listener</code> function for the event named <code>eventName</code>. The </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.EventEmitter.html">EventEmitter</a>.<a href="_internal_.EventEmitter.html#on">on</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:629</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="once" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>once</span><a href="#once" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="once.once-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">once</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.ReadableStream.html#once.once-1.K-7">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">eventName</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#once.once-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Adds a <strong>one-time</strong> <code>listener</code> function for the event named <code>eventName</code>. The
next time <code>eventName</code> is triggered, this listener is removed and then invoked.</p> next time <code>eventName</code> is triggered, this listener is removed and then invoked.</p>
<pre><code class="js"><span class="hl-10">server</span><span class="hl-1">.</span><span class="hl-0">once</span><span class="hl-1">(</span><span class="hl-2">&#39;connection&#39;</span><span class="hl-1">, (</span><span class="hl-10">stream</span><span class="hl-1">) </span><span class="hl-8">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;Ah, we have our first user!&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">});</span> <pre><code class="js"><span class="hl-2">server</span><span class="hl-1">.</span><span class="hl-6">once</span><span class="hl-1">(</span><span class="hl-3">&#39;connection&#39;</span><span class="hl-1">, (</span><span class="hl-2">stream</span><span class="hl-1">) </span><span class="hl-4">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-3">&#39;Ah, we have our first user!&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">});</span>
</code><button type="button">Copy</button></pre> </code><button type="button">Copy</button></pre>
<p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p> <p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p>
<p>By default, event listeners are invoked in the order they are added. The <code>emitter.prependOnceListener()</code> method can be used as an alternative to add the <p>By default, event listeners are invoked in the order they are added. The <code>emitter.prependOnceListener()</code> method can be used as an alternative to add the
event listener to the beginning of the listeners array.</p> event listener to the beginning of the listeners array.</p>
<pre><code class="js"><span class="hl-9">import</span><span class="hl-1"> { </span><span class="hl-10">EventEmitter</span><span class="hl-1"> } </span><span class="hl-9">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><span class="hl-8">const</span><span class="hl-1"> </span><span class="hl-11">myEE</span><span class="hl-1"> = </span><span class="hl-8">new</span><span class="hl-1"> </span><span class="hl-0">EventEmitter</span><span class="hl-1">();</span><br/><span class="hl-10">myEE</span><span class="hl-1">.</span><span class="hl-0">once</span><span class="hl-1">(</span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">, () </span><span class="hl-8">=&gt;</span><span class="hl-1"> </span><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;a&#39;</span><span class="hl-1">));</span><br/><span class="hl-10">myEE</span><span class="hl-1">.</span><span class="hl-0">prependOnceListener</span><span class="hl-1">(</span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">, () </span><span class="hl-8">=&gt;</span><span class="hl-1"> </span><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;b&#39;</span><span class="hl-1">));</span><br/><span class="hl-10">myEE</span><span class="hl-1">.</span><span class="hl-0">emit</span><span class="hl-1">(</span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">);</span><br/><span class="hl-12">// Prints:</span><br/><span class="hl-12">// b</span><br/><span class="hl-12">// a</span> <pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">EventEmitter</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">myEE</span><span class="hl-1"> = </span><span class="hl-4">new</span><span class="hl-1"> </span><span class="hl-6">EventEmitter</span><span class="hl-1">();</span><br/><span class="hl-2">myEE</span><span class="hl-1">.</span><span class="hl-6">once</span><span class="hl-1">(</span><span class="hl-3">&#39;foo&#39;</span><span class="hl-1">, () </span><span class="hl-4">=&gt;</span><span class="hl-1"> </span><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-3">&#39;a&#39;</span><span class="hl-1">));</span><br/><span class="hl-2">myEE</span><span class="hl-1">.</span><span class="hl-6">prependOnceListener</span><span class="hl-1">(</span><span class="hl-3">&#39;foo&#39;</span><span class="hl-1">, () </span><span class="hl-4">=&gt;</span><span class="hl-1"> </span><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-3">&#39;b&#39;</span><span class="hl-1">));</span><br/><span class="hl-2">myEE</span><span class="hl-1">.</span><span class="hl-6">emit</span><span class="hl-1">(</span><span class="hl-3">&#39;foo&#39;</span><span class="hl-1">);</span><br/><span class="hl-7">// Prints:</span><br/><span class="hl-7">// b</span><br/><span class="hl-7">// a</span>
</code><button type="button">Copy</button></pre> </code><button type="button">Copy</button></pre>
</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="once.once-1.K-7" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">K</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">eventName</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></span><div class="tsd-comment tsd-typography"><p>The name of the event.</p> </div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="once.once-1.K-7" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">K</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">eventName</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></span><div class="tsd-comment tsd-typography"><p>The name of the event.</p>
@@ -90,7 +90,7 @@ event listener to the beginning of the listeners array.</p>
event named <code>eventName</code>. No checks are made to see if the <code>listener</code> has event named <code>eventName</code>. No checks are made to see if the <code>listener</code> has
already been added. Multiple calls passing the same combination of <code>eventName</code> already been added. Multiple calls passing the same combination of <code>eventName</code>
and <code>listener</code> will result in the <code>listener</code> being added, and called, multiple times.</p> and <code>listener</code> will result in the <code>listener</code> being added, and called, multiple times.</p>
<pre><code class="js"><span class="hl-10">server</span><span class="hl-1">.</span><span class="hl-0">prependListener</span><span class="hl-1">(</span><span class="hl-2">&#39;connection&#39;</span><span class="hl-1">, (</span><span class="hl-10">stream</span><span class="hl-1">) </span><span class="hl-8">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;someone connected!&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">});</span> <pre><code class="js"><span class="hl-2">server</span><span class="hl-1">.</span><span class="hl-6">prependListener</span><span class="hl-1">(</span><span class="hl-3">&#39;connection&#39;</span><span class="hl-1">, (</span><span class="hl-2">stream</span><span class="hl-1">) </span><span class="hl-4">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-3">&#39;someone connected!&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">});</span>
</code><button type="button">Copy</button></pre> </code><button type="button">Copy</button></pre>
<p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p> <p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p>
@@ -99,7 +99,7 @@ and <code>listener</code> will result in the <code>listener</code> being added,
</div><div class="tsd-comment tsd-typography"></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag">Rest</code><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span>: <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-9" class="tsd-anchor"></a>Since<a href="#Since-9" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v6.0.0</p> </div><div class="tsd-comment tsd-typography"></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag">Rest</code><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span>: <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-9" class="tsd-anchor"></a>Since<a href="#Since-9" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v6.0.0</p>
</div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.EventEmitter.html">EventEmitter</a>.<a href="_internal_.EventEmitter.html#prependListener">prependListener</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:886</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="prependOnceListener" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>prepend<wbr/>Once<wbr/>Listener</span><a href="#prependOnceListener" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="prependOnceListener.prependOnceListener-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">prepend<wbr/>Once<wbr/>Listener</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.ReadableStream.html#prependOnceListener.prependOnceListener-1.K-9">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">eventName</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#prependOnceListener.prependOnceListener-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Adds a <strong>one-time</strong><code>listener</code> function for the event named <code>eventName</code> to the <em>beginning</em> of the listeners array. The next time <code>eventName</code> is triggered, this </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.EventEmitter.html">EventEmitter</a>.<a href="_internal_.EventEmitter.html#prependListener">prependListener</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:886</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="prependOnceListener" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>prepend<wbr/>Once<wbr/>Listener</span><a href="#prependOnceListener" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="prependOnceListener.prependOnceListener-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">prepend<wbr/>Once<wbr/>Listener</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.ReadableStream.html#prependOnceListener.prependOnceListener-1.K-9">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">eventName</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#prependOnceListener.prependOnceListener-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Adds a <strong>one-time</strong><code>listener</code> function for the event named <code>eventName</code> to the <em>beginning</em> of the listeners array. The next time <code>eventName</code> is triggered, this
listener is removed, and then invoked.</p> listener is removed, and then invoked.</p>
<pre><code class="js"><span class="hl-10">server</span><span class="hl-1">.</span><span class="hl-0">prependOnceListener</span><span class="hl-1">(</span><span class="hl-2">&#39;connection&#39;</span><span class="hl-1">, (</span><span class="hl-10">stream</span><span class="hl-1">) </span><span class="hl-8">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;Ah, we have our first user!&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">});</span> <pre><code class="js"><span class="hl-2">server</span><span class="hl-1">.</span><span class="hl-6">prependOnceListener</span><span class="hl-1">(</span><span class="hl-3">&#39;connection&#39;</span><span class="hl-1">, (</span><span class="hl-2">stream</span><span class="hl-1">) </span><span class="hl-4">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-3">&#39;Ah, we have our first user!&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">});</span>
</code><button type="button">Copy</button></pre> </code><button type="button">Copy</button></pre>
<p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p> <p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p>
@@ -108,7 +108,7 @@ listener is removed, and then invoked.</p>
</div><div class="tsd-comment tsd-typography"></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag">Rest</code><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span>: <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-10" class="tsd-anchor"></a>Since<a href="#Since-10" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v6.0.0</p> </div><div class="tsd-comment tsd-typography"></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag">Rest</code><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span>: <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-10" class="tsd-anchor"></a>Since<a href="#Since-10" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v6.0.0</p>
</div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.EventEmitter.html">EventEmitter</a>.<a href="_internal_.EventEmitter.html#prependOnceListener">prependOnceListener</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:902</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="rawListeners" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>raw<wbr/>Listeners</span><a href="#rawListeners" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="rawListeners.rawListeners-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">raw<wbr/>Listeners</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.ReadableStream.html#rawListeners.rawListeners-1.K-10">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">eventName</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Function</span><span class="tsd-signature-symbol">[]</span><a href="#rawListeners.rawListeners-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns a copy of the array of listeners for the event named <code>eventName</code>, </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.EventEmitter.html">EventEmitter</a>.<a href="_internal_.EventEmitter.html#prependOnceListener">prependOnceListener</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:902</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="rawListeners" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>raw<wbr/>Listeners</span><a href="#rawListeners" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="rawListeners.rawListeners-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">raw<wbr/>Listeners</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.ReadableStream.html#rawListeners.rawListeners-1.K-10">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">eventName</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Function</span><span class="tsd-signature-symbol">[]</span><a href="#rawListeners.rawListeners-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns a copy of the array of listeners for the event named <code>eventName</code>,
including any wrappers (such as those created by <code>.once()</code>).</p> including any wrappers (such as those created by <code>.once()</code>).</p>
<pre><code class="js"><span class="hl-9">import</span><span class="hl-1"> { </span><span class="hl-10">EventEmitter</span><span class="hl-1"> } </span><span class="hl-9">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><span class="hl-8">const</span><span class="hl-1"> </span><span class="hl-11">emitter</span><span class="hl-1"> = </span><span class="hl-8">new</span><span class="hl-1"> </span><span class="hl-0">EventEmitter</span><span class="hl-1">();</span><br/><span class="hl-10">emitter</span><span class="hl-1">.</span><span class="hl-0">once</span><span class="hl-1">(</span><span class="hl-2">&#39;log&#39;</span><span class="hl-1">, () </span><span class="hl-8">=&gt;</span><span class="hl-1"> </span><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;log once&#39;</span><span class="hl-1">));</span><br/><br/><span class="hl-12">// Returns a new Array with a function `onceWrapper` which has a property</span><br/><span class="hl-12">// `listener` which contains the original listener bound above</span><br/><span class="hl-8">const</span><span class="hl-1"> </span><span class="hl-11">listeners</span><span class="hl-1"> = </span><span class="hl-10">emitter</span><span class="hl-1">.</span><span class="hl-0">rawListeners</span><span class="hl-1">(</span><span class="hl-2">&#39;log&#39;</span><span class="hl-1">);</span><br/><span class="hl-8">const</span><span class="hl-1"> </span><span class="hl-11">logFnWrapper</span><span class="hl-1"> = </span><span class="hl-10">listeners</span><span class="hl-1">[</span><span class="hl-13">0</span><span class="hl-1">];</span><br/><br/><span class="hl-12">// Logs &quot;log once&quot; to the console and does not unbind the `once` event</span><br/><span class="hl-10">logFnWrapper</span><span class="hl-1">.</span><span class="hl-0">listener</span><span class="hl-1">();</span><br/><br/><span class="hl-12">// Logs &quot;log once&quot; to the console and removes the listener</span><br/><span class="hl-0">logFnWrapper</span><span class="hl-1">();</span><br/><br/><span class="hl-10">emitter</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;log&#39;</span><span class="hl-1">, () </span><span class="hl-8">=&gt;</span><span class="hl-1"> </span><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;log persistently&#39;</span><span class="hl-1">));</span><br/><span class="hl-12">// Will return a new Array with a single function bound by `.on()` above</span><br/><span class="hl-8">const</span><span class="hl-1"> </span><span class="hl-11">newListeners</span><span class="hl-1"> = </span><span class="hl-10">emitter</span><span class="hl-1">.</span><span class="hl-0">rawListeners</span><span class="hl-1">(</span><span class="hl-2">&#39;log&#39;</span><span class="hl-1">);</span><br/><br/><span class="hl-12">// Logs &quot;log persistently&quot; twice</span><br/><span class="hl-10">newListeners</span><span class="hl-1">[</span><span class="hl-13">0</span><span class="hl-1">]();</span><br/><span class="hl-10">emitter</span><span class="hl-1">.</span><span class="hl-0">emit</span><span class="hl-1">(</span><span class="hl-2">&#39;log&#39;</span><span class="hl-1">);</span> <pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">EventEmitter</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">emitter</span><span class="hl-1"> = </span><span class="hl-4">new</span><span class="hl-1"> </span><span class="hl-6">EventEmitter</span><span class="hl-1">();</span><br/><span class="hl-2">emitter</span><span class="hl-1">.</span><span class="hl-6">once</span><span class="hl-1">(</span><span class="hl-3">&#39;log&#39;</span><span class="hl-1">, () </span><span class="hl-4">=&gt;</span><span class="hl-1"> </span><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-3">&#39;log once&#39;</span><span class="hl-1">));</span><br/><br/><span class="hl-7">// Returns a new Array with a function `onceWrapper` which has a property</span><br/><span class="hl-7">// `listener` which contains the original listener bound above</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">listeners</span><span class="hl-1"> = </span><span class="hl-2">emitter</span><span class="hl-1">.</span><span class="hl-6">rawListeners</span><span class="hl-1">(</span><span class="hl-3">&#39;log&#39;</span><span class="hl-1">);</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">logFnWrapper</span><span class="hl-1"> = </span><span class="hl-2">listeners</span><span class="hl-1">[</span><span class="hl-13">0</span><span class="hl-1">];</span><br/><br/><span class="hl-7">// Logs &quot;log once&quot; to the console and does not unbind the `once` event</span><br/><span class="hl-2">logFnWrapper</span><span class="hl-1">.</span><span class="hl-6">listener</span><span class="hl-1">();</span><br/><br/><span class="hl-7">// Logs &quot;log once&quot; to the console and removes the listener</span><br/><span class="hl-6">logFnWrapper</span><span class="hl-1">();</span><br/><br/><span class="hl-2">emitter</span><span class="hl-1">.</span><span class="hl-6">on</span><span class="hl-1">(</span><span class="hl-3">&#39;log&#39;</span><span class="hl-1">, () </span><span class="hl-4">=&gt;</span><span class="hl-1"> </span><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-3">&#39;log persistently&#39;</span><span class="hl-1">));</span><br/><span class="hl-7">// Will return a new Array with a single function bound by `.on()` above</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">newListeners</span><span class="hl-1"> = </span><span class="hl-2">emitter</span><span class="hl-1">.</span><span class="hl-6">rawListeners</span><span class="hl-1">(</span><span class="hl-3">&#39;log&#39;</span><span class="hl-1">);</span><br/><br/><span class="hl-7">// Logs &quot;log persistently&quot; twice</span><br/><span class="hl-2">newListeners</span><span class="hl-1">[</span><span class="hl-13">0</span><span class="hl-1">]();</span><br/><span class="hl-2">emitter</span><span class="hl-1">.</span><span class="hl-6">emit</span><span class="hl-1">(</span><span class="hl-3">&#39;log&#39;</span><span class="hl-1">);</span>
</code><button type="button">Copy</button></pre> </code><button type="button">Copy</button></pre>
</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="rawListeners.rawListeners-1.K-10" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">K</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">eventName</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Function</span><span class="tsd-signature-symbol">[]</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-11" class="tsd-anchor"></a>Since<a href="#Since-11" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v9.4.0</p> </div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="rawListeners.rawListeners-1.K-10" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">K</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">eventName</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Function</span><span class="tsd-signature-symbol">[]</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-11" class="tsd-anchor"></a>Since<a href="#Since-11" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v9.4.0</p>
@@ -119,7 +119,7 @@ component or module (e.g. sockets or file streams).</p>
<p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p> <p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">eventName</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-12" class="tsd-anchor"></a>Since<a href="#Since-12" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.1.26</p> </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">eventName</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Since-12" class="tsd-anchor"></a>Since<a href="#Since-12" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.1.26</p>
</div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.EventEmitter.html">EventEmitter</a>.<a href="_internal_.EventEmitter.html#removeAllListeners">removeAllListeners</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:758</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="removeListener" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>remove<wbr/>Listener</span><a href="#removeListener" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="removeListener.removeListener-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">remove<wbr/>Listener</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.ReadableStream.html#removeListener.removeListener-1.K-11">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">eventName</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#removeListener.removeListener-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Removes the specified <code>listener</code> from the listener array for the event named <code>eventName</code>.</p> </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.EventEmitter.html">EventEmitter</a>.<a href="_internal_.EventEmitter.html#removeAllListeners">removeAllListeners</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:758</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="removeListener" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>remove<wbr/>Listener</span><a href="#removeListener" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="removeListener.removeListener-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">remove<wbr/>Listener</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.ReadableStream.html#removeListener.removeListener-1.K-11">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">eventName</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#removeListener.removeListener-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Removes the specified <code>listener</code> from the listener array for the event named <code>eventName</code>.</p>
<pre><code class="js"><span class="hl-8">const</span><span class="hl-1"> </span><span class="hl-0">callback</span><span class="hl-1"> = (</span><span class="hl-10">stream</span><span class="hl-1">) </span><span class="hl-8">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;someone connected!&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">};</span><br/><span class="hl-10">server</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;connection&#39;</span><span class="hl-1">, </span><span class="hl-10">callback</span><span class="hl-1">);</span><br/><span class="hl-12">// ...</span><br/><span class="hl-10">server</span><span class="hl-1">.</span><span class="hl-0">removeListener</span><span class="hl-1">(</span><span class="hl-2">&#39;connection&#39;</span><span class="hl-1">, </span><span class="hl-10">callback</span><span class="hl-1">);</span> <pre><code class="js"><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-6">callback</span><span class="hl-1"> = (</span><span class="hl-2">stream</span><span class="hl-1">) </span><span class="hl-4">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-3">&#39;someone connected!&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">};</span><br/><span class="hl-2">server</span><span class="hl-1">.</span><span class="hl-6">on</span><span class="hl-1">(</span><span class="hl-3">&#39;connection&#39;</span><span class="hl-1">, </span><span class="hl-2">callback</span><span class="hl-1">);</span><br/><span class="hl-7">// ...</span><br/><span class="hl-2">server</span><span class="hl-1">.</span><span class="hl-6">removeListener</span><span class="hl-1">(</span><span class="hl-3">&#39;connection&#39;</span><span class="hl-1">, </span><span class="hl-2">callback</span><span class="hl-1">);</span>
</code><button type="button">Copy</button></pre> </code><button type="button">Copy</button></pre>
<p><code>removeListener()</code> will remove, at most, one instance of a listener from the <p><code>removeListener()</code> will remove, at most, one instance of a listener from the
@@ -129,7 +129,7 @@ called multiple times to remove each instance.</p>
<p>Once an event is emitted, all listeners attached to it at the <p>Once an event is emitted, all listeners attached to it at the
time of emitting are called in order. This implies that any <code>removeListener()</code> or <code>removeAllListeners()</code> calls <em>after</em> emitting and <em>before</em> the last listener finishes execution time of emitting are called in order. This implies that any <code>removeListener()</code> or <code>removeAllListeners()</code> calls <em>after</em> emitting and <em>before</em> the last listener finishes execution
will not remove them from<code>emit()</code> in progress. Subsequent events behave as expected.</p> will not remove them from<code>emit()</code> in progress. Subsequent events behave as expected.</p>
<pre><code class="js"><span class="hl-9">import</span><span class="hl-1"> { </span><span class="hl-10">EventEmitter</span><span class="hl-1"> } </span><span class="hl-9">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><span class="hl-8">class</span><span class="hl-1"> </span><span class="hl-15">MyEmitter</span><span class="hl-1"> </span><span class="hl-8">extends</span><span class="hl-1"> </span><span class="hl-15">EventEmitter</span><span class="hl-1"> {}</span><br/><span class="hl-8">const</span><span class="hl-1"> </span><span class="hl-11">myEmitter</span><span class="hl-1"> = </span><span class="hl-8">new</span><span class="hl-1"> </span><span class="hl-0">MyEmitter</span><span class="hl-1">();</span><br/><br/><span class="hl-8">const</span><span class="hl-1"> </span><span class="hl-0">callbackA</span><span class="hl-1"> = () </span><span class="hl-8">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;A&#39;</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-10">myEmitter</span><span class="hl-1">.</span><span class="hl-0">removeListener</span><span class="hl-1">(</span><span class="hl-2">&#39;event&#39;</span><span class="hl-1">, </span><span class="hl-10">callbackB</span><span class="hl-1">);</span><br/><span class="hl-1">};</span><br/><br/><span class="hl-8">const</span><span class="hl-1"> </span><span class="hl-0">callbackB</span><span class="hl-1"> = () </span><span class="hl-8">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;B&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">};</span><br/><br/><span class="hl-10">myEmitter</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;event&#39;</span><span class="hl-1">, </span><span class="hl-10">callbackA</span><span class="hl-1">);</span><br/><br/><span class="hl-10">myEmitter</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;event&#39;</span><span class="hl-1">, </span><span class="hl-10">callbackB</span><span class="hl-1">);</span><br/><br/><span class="hl-12">// callbackA removes listener callbackB but it will still be called.</span><br/><span class="hl-12">// Internal listener array at time of emit [callbackA, callbackB]</span><br/><span class="hl-10">myEmitter</span><span class="hl-1">.</span><span class="hl-0">emit</span><span class="hl-1">(</span><span class="hl-2">&#39;event&#39;</span><span class="hl-1">);</span><br/><span class="hl-12">// Prints:</span><br/><span class="hl-12">// A</span><br/><span class="hl-12">// B</span><br/><br/><span class="hl-12">// callbackB is now removed.</span><br/><span class="hl-12">// Internal listener array [callbackA]</span><br/><span class="hl-10">myEmitter</span><span class="hl-1">.</span><span class="hl-0">emit</span><span class="hl-1">(</span><span class="hl-2">&#39;event&#39;</span><span class="hl-1">);</span><br/><span class="hl-12">// Prints:</span><br/><span class="hl-12">// A</span> <pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">EventEmitter</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><span class="hl-4">class</span><span class="hl-1"> </span><span class="hl-15">MyEmitter</span><span class="hl-1"> </span><span class="hl-4">extends</span><span class="hl-1"> </span><span class="hl-15">EventEmitter</span><span class="hl-1"> {}</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">myEmitter</span><span class="hl-1"> = </span><span class="hl-4">new</span><span class="hl-1"> </span><span class="hl-6">MyEmitter</span><span class="hl-1">();</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-6">callbackA</span><span class="hl-1"> = () </span><span class="hl-4">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-3">&#39;A&#39;</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-2">myEmitter</span><span class="hl-1">.</span><span class="hl-6">removeListener</span><span class="hl-1">(</span><span class="hl-3">&#39;event&#39;</span><span class="hl-1">, </span><span class="hl-2">callbackB</span><span class="hl-1">);</span><br/><span class="hl-1">};</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-6">callbackB</span><span class="hl-1"> = () </span><span class="hl-4">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-3">&#39;B&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">};</span><br/><br/><span class="hl-2">myEmitter</span><span class="hl-1">.</span><span class="hl-6">on</span><span class="hl-1">(</span><span class="hl-3">&#39;event&#39;</span><span class="hl-1">, </span><span class="hl-2">callbackA</span><span class="hl-1">);</span><br/><br/><span class="hl-2">myEmitter</span><span class="hl-1">.</span><span class="hl-6">on</span><span class="hl-1">(</span><span class="hl-3">&#39;event&#39;</span><span class="hl-1">, </span><span class="hl-2">callbackB</span><span class="hl-1">);</span><br/><br/><span class="hl-7">// callbackA removes listener callbackB but it will still be called.</span><br/><span class="hl-7">// Internal listener array at time of emit [callbackA, callbackB]</span><br/><span class="hl-2">myEmitter</span><span class="hl-1">.</span><span class="hl-6">emit</span><span class="hl-1">(</span><span class="hl-3">&#39;event&#39;</span><span class="hl-1">);</span><br/><span class="hl-7">// Prints:</span><br/><span class="hl-7">// A</span><br/><span class="hl-7">// B</span><br/><br/><span class="hl-7">// callbackB is now removed.</span><br/><span class="hl-7">// Internal listener array [callbackA]</span><br/><span class="hl-2">myEmitter</span><span class="hl-1">.</span><span class="hl-6">emit</span><span class="hl-1">(</span><span class="hl-3">&#39;event&#39;</span><span class="hl-1">);</span><br/><span class="hl-7">// Prints:</span><br/><span class="hl-7">// A</span>
</code><button type="button">Copy</button></pre> </code><button type="button">Copy</button></pre>
<p>Because listeners are managed using an internal array, calling this will <p>Because listeners are managed using an internal array, calling this will
@@ -140,7 +140,7 @@ the <code>emitter.listeners()</code> method will need to be recreated.</p>
<p>When a single function has been added as a handler multiple times for a single <p>When a single function has been added as a handler multiple times for a single
event (as in the example below), <code>removeListener()</code> will remove the most event (as in the example below), <code>removeListener()</code> will remove the most
recently added instance. In the example the <code>once('ping')</code> listener is removed:</p> recently added instance. In the example the <code>once('ping')</code> listener is removed:</p>
<pre><code class="js"><span class="hl-9">import</span><span class="hl-1"> { </span><span class="hl-10">EventEmitter</span><span class="hl-1"> } </span><span class="hl-9">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><span class="hl-8">const</span><span class="hl-1"> </span><span class="hl-11">ee</span><span class="hl-1"> = </span><span class="hl-8">new</span><span class="hl-1"> </span><span class="hl-0">EventEmitter</span><span class="hl-1">();</span><br/><br/><span class="hl-8">function</span><span class="hl-1"> </span><span class="hl-0">pong</span><span class="hl-1">() {</span><br/><span class="hl-1"> </span><span class="hl-10">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;pong&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">}</span><br/><br/><span class="hl-10">ee</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;ping&#39;</span><span class="hl-1">, </span><span class="hl-10">pong</span><span class="hl-1">);</span><br/><span class="hl-10">ee</span><span class="hl-1">.</span><span class="hl-0">once</span><span class="hl-1">(</span><span class="hl-2">&#39;ping&#39;</span><span class="hl-1">, </span><span class="hl-10">pong</span><span class="hl-1">);</span><br/><span class="hl-10">ee</span><span class="hl-1">.</span><span class="hl-0">removeListener</span><span class="hl-1">(</span><span class="hl-2">&#39;ping&#39;</span><span class="hl-1">, </span><span class="hl-10">pong</span><span class="hl-1">);</span><br/><br/><span class="hl-10">ee</span><span class="hl-1">.</span><span class="hl-0">emit</span><span class="hl-1">(</span><span class="hl-2">&#39;ping&#39;</span><span class="hl-1">);</span><br/><span class="hl-10">ee</span><span class="hl-1">.</span><span class="hl-0">emit</span><span class="hl-1">(</span><span class="hl-2">&#39;ping&#39;</span><span class="hl-1">);</span> <pre><code class="js"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">EventEmitter</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-5">ee</span><span class="hl-1"> = </span><span class="hl-4">new</span><span class="hl-1"> </span><span class="hl-6">EventEmitter</span><span class="hl-1">();</span><br/><br/><span class="hl-4">function</span><span class="hl-1"> </span><span class="hl-6">pong</span><span class="hl-1">() {</span><br/><span class="hl-1"> </span><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-6">log</span><span class="hl-1">(</span><span class="hl-3">&#39;pong&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">}</span><br/><br/><span class="hl-2">ee</span><span class="hl-1">.</span><span class="hl-6">on</span><span class="hl-1">(</span><span class="hl-3">&#39;ping&#39;</span><span class="hl-1">, </span><span class="hl-2">pong</span><span class="hl-1">);</span><br/><span class="hl-2">ee</span><span class="hl-1">.</span><span class="hl-6">once</span><span class="hl-1">(</span><span class="hl-3">&#39;ping&#39;</span><span class="hl-1">, </span><span class="hl-2">pong</span><span class="hl-1">);</span><br/><span class="hl-2">ee</span><span class="hl-1">.</span><span class="hl-6">removeListener</span><span class="hl-1">(</span><span class="hl-3">&#39;ping&#39;</span><span class="hl-1">, </span><span class="hl-2">pong</span><span class="hl-1">);</span><br/><br/><span class="hl-2">ee</span><span class="hl-1">.</span><span class="hl-6">emit</span><span class="hl-1">(</span><span class="hl-3">&#39;ping&#39;</span><span class="hl-1">);</span><br/><span class="hl-2">ee</span><span class="hl-1">.</span><span class="hl-6">emit</span><span class="hl-1">(</span><span class="hl-3">&#39;ping&#39;</span><span class="hl-1">);</span>
</code><button type="button">Copy</button></pre> </code><button type="button">Copy</button></pre>
<p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p> <p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p>
File diff suppressed because one or more lines are too long
+21
View File
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2016 Jun Yang
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

+1 -1
View File
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -5,7 +5,7 @@
<title>abs | LiquidJS</title> <title>abs | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -121,7 +121,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.049Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.982Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="overview.html" class="article-footer-prev" title="Overview"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="append.html" class="article-footer-next" title="sidebar.filters.append"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="overview.html" class="article-footer-prev" title="Overview"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="append.html" class="article-footer-next" title="sidebar.filters.append"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>append | LiquidJS</title> <title>append | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -117,7 +117,7 @@ website.com/index.html<span aria-hidden="true" class="line-numbers-rows"><span><
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.049Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.982Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="abs.html" class="article-footer-prev" title="sidebar.filters.abs"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="array_to_sentence_string.html" class="article-footer-next" title="sidebar.filters.array_to_sentence_string"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="abs.html" class="article-footer-prev" title="sidebar.filters.abs"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="array_to_sentence_string.html" class="article-footer-next" title="sidebar.filters.array_to_sentence_string"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>array_to_sentence_string | LiquidJS</title> <title>array_to_sentence_string | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -114,7 +114,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.049Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.982Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="append.html" class="article-footer-prev" title="sidebar.filters.append"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="at_least.html" class="article-footer-next" title="sidebar.filters.at_least"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="append.html" class="article-footer-prev" title="sidebar.filters.append"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="at_least.html" class="article-footer-next" title="sidebar.filters.at_least"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>at_least | LiquidJS</title> <title>at_least | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -114,7 +114,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.049Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.982Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="array_to_sentence_string.html" class="article-footer-prev" title="sidebar.filters.array_to_sentence_string"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="at_most.html" class="article-footer-next" title="sidebar.filters.at_most"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="array_to_sentence_string.html" class="article-footer-prev" title="sidebar.filters.array_to_sentence_string"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="at_most.html" class="article-footer-next" title="sidebar.filters.at_most"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>at_most | LiquidJS</title> <title>at_most | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -114,7 +114,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.049Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.982Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="at_least.html" class="article-footer-prev" title="sidebar.filters.at_least"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="capitalize.html" class="article-footer-next" title="sidebar.filters.capitalize"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="at_least.html" class="article-footer-prev" title="sidebar.filters.at_least"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="capitalize.html" class="article-footer-next" title="sidebar.filters.capitalize"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>base64_decode | LiquidJS</title> <title>base64_decode | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -113,7 +113,7 @@
<pre class="line-numbers language-text" data-language="text"><code class="language-text">Hello, World! @#$%<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre> <pre class="line-numbers language-text" data-language="text"><code class="language-text">Hello, World! @#$%<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.049Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.982Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="overview.html" class="article-footer-next" title="Overview"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="overview.html" class="article-footer-next" title="Overview"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>base64_encode | LiquidJS</title> <title>base64_encode | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -113,7 +113,7 @@
<pre class="line-numbers language-text" data-language="text"><code class="language-text">SGVsbG8sIFdvcmxkISBAIyQl<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre> <pre class="line-numbers language-text" data-language="text"><code class="language-text">SGVsbG8sIFdvcmxkISBAIyQl<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.049Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.982Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="overview.html" class="article-footer-next" title="Overview"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="overview.html" class="article-footer-next" title="Overview"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>capitalize | LiquidJS</title> <title>capitalize | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -115,7 +115,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.049Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.982Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="at_most.html" class="article-footer-prev" title="sidebar.filters.at_most"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="ceil.html" class="article-footer-next" title="sidebar.filters.ceil"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="at_most.html" class="article-footer-prev" title="sidebar.filters.at_most"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="ceil.html" class="article-footer-next" title="sidebar.filters.ceil"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>ceil | LiquidJS</title> <title>ceil | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -127,7 +127,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.049Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.982Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="capitalize.html" class="article-footer-prev" title="sidebar.filters.capitalize"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="cgi_escape.html" class="article-footer-next" title="sidebar.filters.cgi_escape"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="capitalize.html" class="article-footer-prev" title="sidebar.filters.capitalize"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="cgi_escape.html" class="article-footer-next" title="sidebar.filters.cgi_escape"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>cgi_escape | LiquidJS</title> <title>cgi_escape | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -108,7 +108,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.049Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.982Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="ceil.html" class="article-footer-prev" title="sidebar.filters.ceil"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="compact.html" class="article-footer-next" title="sidebar.filters.compact"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="ceil.html" class="article-footer-prev" title="sidebar.filters.ceil"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="compact.html" class="article-footer-next" title="sidebar.filters.compact"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>compact | LiquidJS</title> <title>compact | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -134,7 +134,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.049Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.982Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="cgi_escape.html" class="article-footer-prev" title="sidebar.filters.cgi_escape"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="concat.html" class="article-footer-next" title="sidebar.filters.concat"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="cgi_escape.html" class="article-footer-prev" title="sidebar.filters.cgi_escape"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="concat.html" class="article-footer-next" title="sidebar.filters.concat"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>concat | LiquidJS</title> <title>concat | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -141,7 +141,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.049Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.982Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="compact.html" class="article-footer-prev" title="sidebar.filters.compact"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="date.html" class="article-footer-next" title="sidebar.filters.date"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="compact.html" class="article-footer-prev" title="sidebar.filters.compact"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="date.html" class="article-footer-next" title="sidebar.filters.date"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>date | LiquidJS</title> <title>date | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -162,7 +162,7 @@ Last updated on: <span class="token liquid language-liquid"><span class="token d
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.049Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.982Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="concat.html" class="article-footer-prev" title="sidebar.filters.concat"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="date_to_long_string.html" class="article-footer-next" title="sidebar.filters.date_to_long_string"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="concat.html" class="article-footer-prev" title="sidebar.filters.concat"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="date_to_long_string.html" class="article-footer-next" title="sidebar.filters.date_to_long_string"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>date_to_long_string | LiquidJS</title> <title>date_to_long_string | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -116,7 +116,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.049Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.982Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="date.html" class="article-footer-prev" title="sidebar.filters.date"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="date_to_rfc822.html" class="article-footer-next" title="sidebar.filters.date_to_rfc822"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="date.html" class="article-footer-prev" title="sidebar.filters.date"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="date_to_rfc822.html" class="article-footer-next" title="sidebar.filters.date_to_rfc822"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>date_to_rfc822 | LiquidJS</title> <title>date_to_rfc822 | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -110,7 +110,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.049Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.982Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="date_to_long_string.html" class="article-footer-prev" title="sidebar.filters.date_to_long_string"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="date_to_string.html" class="article-footer-next" title="sidebar.filters.date_to_string"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="date_to_long_string.html" class="article-footer-prev" title="sidebar.filters.date_to_long_string"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="date_to_string.html" class="article-footer-next" title="sidebar.filters.date_to_string"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>date_to_string | LiquidJS</title> <title>date_to_string | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -116,7 +116,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.049Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.982Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="date_to_rfc822.html" class="article-footer-prev" title="sidebar.filters.date_to_rfc822"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="date_to_xmlschema.html" class="article-footer-next" title="sidebar.filters.date_to_xmlschema"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="date_to_rfc822.html" class="article-footer-prev" title="sidebar.filters.date_to_rfc822"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="date_to_xmlschema.html" class="article-footer-next" title="sidebar.filters.date_to_xmlschema"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>date_to_xmlschema | LiquidJS</title> <title>date_to_xmlschema | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -110,7 +110,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.049Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.982Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="date_to_string.html" class="article-footer-prev" title="sidebar.filters.date_to_string"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="default.html" class="article-footer-next" title="sidebar.filters.default"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="date_to_string.html" class="article-footer-prev" title="sidebar.filters.date_to_string"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="default.html" class="article-footer-next" title="sidebar.filters.default"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>default | LiquidJS</title> <title>default | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -136,7 +136,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.049Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.982Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="date_to_xmlschema.html" class="article-footer-prev" title="sidebar.filters.date_to_xmlschema"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="divided_by.html" class="article-footer-next" title="sidebar.filters.divided_by"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="date_to_xmlschema.html" class="article-footer-prev" title="sidebar.filters.date_to_xmlschema"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="divided_by.html" class="article-footer-next" title="sidebar.filters.divided_by"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>divided_by | LiquidJS</title> <title>divided_by | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -126,7 +126,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.049Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.982Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="default.html" class="article-footer-prev" title="sidebar.filters.default"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="downcase.html" class="article-footer-next" title="sidebar.filters.downcase"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="default.html" class="article-footer-prev" title="sidebar.filters.default"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="downcase.html" class="article-footer-next" title="sidebar.filters.downcase"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>downcase | LiquidJS</title> <title>downcase | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -114,7 +114,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.049Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.982Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="divided_by.html" class="article-footer-prev" title="sidebar.filters.divided_by"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="escape.html" class="article-footer-next" title="sidebar.filters.escape"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="divided_by.html" class="article-footer-prev" title="sidebar.filters.divided_by"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="escape.html" class="article-footer-next" title="sidebar.filters.escape"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>escape | LiquidJS</title> <title>escape | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -116,7 +116,7 @@ Have you read &amp;#39;James &amp;amp; the Giant Peach&amp;#39;?
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.049Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.982Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="downcase.html" class="article-footer-prev" title="sidebar.filters.downcase"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="escape_once.html" class="article-footer-next" title="sidebar.filters.escape_once"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="downcase.html" class="article-footer-prev" title="sidebar.filters.downcase"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="escape_once.html" class="article-footer-next" title="sidebar.filters.escape_once"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>escape_once | LiquidJS</title> <title>escape_once | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -120,7 +120,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.049Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.982Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="escape.html" class="article-footer-prev" title="sidebar.filters.escape"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="find.html" class="article-footer-next" title="sidebar.filters.find"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="escape.html" class="article-footer-prev" title="sidebar.filters.escape"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="find.html" class="article-footer-next" title="sidebar.filters.find"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>find | LiquidJS</title> <title>find | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -114,7 +114,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.049Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.982Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="escape_once.html" class="article-footer-prev" title="sidebar.filters.escape_once"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="find_exp.html" class="article-footer-next" title="sidebar.filters.find_exp"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="escape_once.html" class="article-footer-prev" title="sidebar.filters.escape_once"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="find_exp.html" class="article-footer-next" title="sidebar.filters.find_exp"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>find_exp | LiquidJS</title> <title>find_exp | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -114,7 +114,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.049Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.982Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="find.html" class="article-footer-prev" title="sidebar.filters.find"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="find_index.html" class="article-footer-next" title="sidebar.filters.find_index"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="find.html" class="article-footer-prev" title="sidebar.filters.find"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="find_index.html" class="article-footer-next" title="sidebar.filters.find_index"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>find_index | LiquidJS</title> <title>find_index | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -114,7 +114,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.049Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.982Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="find_exp.html" class="article-footer-prev" title="sidebar.filters.find_exp"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="find_index_exp.html" class="article-footer-next" title="sidebar.filters.find_index_exp"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="find_exp.html" class="article-footer-prev" title="sidebar.filters.find_exp"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="find_index_exp.html" class="article-footer-next" title="sidebar.filters.find_index_exp"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>find_index_exp | LiquidJS</title> <title>find_index_exp | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -114,7 +114,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.049Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.982Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="find_index.html" class="article-footer-prev" title="sidebar.filters.find_index"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="first.html" class="article-footer-next" title="sidebar.filters.first"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="find_index.html" class="article-footer-prev" title="sidebar.filters.find_index"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="first.html" class="article-footer-next" title="sidebar.filters.first"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>first | LiquidJS</title> <title>first | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -121,7 +121,7 @@ zebra<span aria-hidden="true" class="line-numbers-rows"><span></span><span></spa
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.049Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.982Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="find_index_exp.html" class="article-footer-prev" title="sidebar.filters.find_index_exp"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="floor.html" class="article-footer-next" title="sidebar.filters.floor"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="find_index_exp.html" class="article-footer-prev" title="sidebar.filters.find_index_exp"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="floor.html" class="article-footer-next" title="sidebar.filters.floor"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>floor | LiquidJS</title> <title>floor | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -127,7 +127,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.049Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.982Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="first.html" class="article-footer-prev" title="sidebar.filters.first"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="group_by.html" class="article-footer-next" title="sidebar.filters.group_by"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="first.html" class="article-footer-prev" title="sidebar.filters.first"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="group_by.html" class="article-footer-next" title="sidebar.filters.group_by"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>group_by | LiquidJS</title> <title>group_by | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -137,7 +137,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.049Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.982Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="floor.html" class="article-footer-prev" title="sidebar.filters.floor"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="group_by_exp.html" class="article-footer-next" title="sidebar.filters.group_by_exp"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="floor.html" class="article-footer-prev" title="sidebar.filters.floor"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="group_by_exp.html" class="article-footer-next" title="sidebar.filters.group_by_exp"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>group_by_exp | LiquidJS</title> <title>group_by_exp | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -137,7 +137,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.049Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.982Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="group_by.html" class="article-footer-prev" title="sidebar.filters.group_by"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="has.html" class="article-footer-next" title="sidebar.filters.has"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="group_by.html" class="article-footer-prev" title="sidebar.filters.group_by"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="has.html" class="article-footer-next" title="sidebar.filters.has"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>has | LiquidJS</title> <title>has | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -114,7 +114,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.049Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.982Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="group_by_exp.html" class="article-footer-prev" title="sidebar.filters.group_by_exp"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="has_exp.html" class="article-footer-next" title="sidebar.filters.has_exp"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="group_by_exp.html" class="article-footer-prev" title="sidebar.filters.group_by_exp"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="has_exp.html" class="article-footer-next" title="sidebar.filters.has_exp"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>has_exp | LiquidJS</title> <title>has_exp | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -114,7 +114,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.049Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.982Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="has.html" class="article-footer-prev" title="sidebar.filters.has"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="inspect.html" class="article-footer-next" title="sidebar.filters.inspect"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="has.html" class="article-footer-prev" title="sidebar.filters.has"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="inspect.html" class="article-footer-next" title="sidebar.filters.inspect"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>hmac_sha256 | LiquidJS</title> <title>hmac_sha256 | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -109,7 +109,7 @@ My secret potion: <span class="token liquid language-liquid"><span class="token
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.049Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.982Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="overview.html" class="article-footer-next" title="Overview"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="overview.html" class="article-footer-next" title="Overview"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>inspect | LiquidJS</title> <title>inspect | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -124,7 +124,7 @@ const scope &#x3D; &#123; foo &#125;<span aria-hidden="true" class="line-numbers
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.049Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.982Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="has_exp.html" class="article-footer-prev" title="sidebar.filters.has_exp"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="join.html" class="article-footer-next" title="sidebar.filters.join"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="has_exp.html" class="article-footer-prev" title="sidebar.filters.has_exp"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="join.html" class="article-footer-next" title="sidebar.filters.join"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>join | LiquidJS</title> <title>join | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -110,7 +110,7 @@ John and Paul and George and Ringo<span aria-hidden="true" class="line-numbers-r
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.049Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.982Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="inspect.html" class="article-footer-prev" title="sidebar.filters.inspect"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="json.html" class="article-footer-next" title="sidebar.filters.json"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="inspect.html" class="article-footer-prev" title="sidebar.filters.inspect"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="json.html" class="article-footer-next" title="sidebar.filters.json"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>json | LiquidJS</title> <title>json | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -123,7 +123,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.049Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.982Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="join.html" class="article-footer-prev" title="sidebar.filters.join"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="jsonify.html" class="article-footer-next" title="sidebar.filters.jsonify"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="join.html" class="article-footer-prev" title="sidebar.filters.join"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="jsonify.html" class="article-footer-next" title="sidebar.filters.jsonify"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>jsonify | LiquidJS</title> <title>jsonify | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -103,7 +103,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.049Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.982Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="json.html" class="article-footer-prev" title="sidebar.filters.json"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="last.html" class="article-footer-next" title="sidebar.filters.last"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="json.html" class="article-footer-prev" title="sidebar.filters.json"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="last.html" class="article-footer-next" title="sidebar.filters.last"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>last | LiquidJS</title> <title>last | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -121,7 +121,7 @@ tiger<span aria-hidden="true" class="line-numbers-rows"><span></span><span></spa
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.049Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.982Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="jsonify.html" class="article-footer-prev" title="sidebar.filters.jsonify"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="lstrip.html" class="article-footer-next" title="sidebar.filters.lstrip"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="jsonify.html" class="article-footer-prev" title="sidebar.filters.jsonify"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="lstrip.html" class="article-footer-next" title="sidebar.filters.lstrip"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>lstrip | LiquidJS</title> <title>lstrip | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -108,7 +108,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.049Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.982Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="last.html" class="article-footer-prev" title="sidebar.filters.last"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="map.html" class="article-footer-next" title="sidebar.filters.map"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="last.html" class="article-footer-prev" title="sidebar.filters.last"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="map.html" class="article-footer-next" title="sidebar.filters.map"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>map | LiquidJS</title> <title>map | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -117,7 +117,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.049Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.982Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="lstrip.html" class="article-footer-prev" title="sidebar.filters.lstrip"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="minus.html" class="article-footer-next" title="sidebar.filters.minus"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="lstrip.html" class="article-footer-prev" title="sidebar.filters.lstrip"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="minus.html" class="article-footer-next" title="sidebar.filters.minus"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>minus | LiquidJS</title> <title>minus | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -120,7 +120,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.049Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.982Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="map.html" class="article-footer-prev" title="sidebar.filters.map"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="modulo.html" class="article-footer-next" title="sidebar.filters.modulo"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="map.html" class="article-footer-prev" title="sidebar.filters.map"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="modulo.html" class="article-footer-next" title="sidebar.filters.modulo"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>modulo | LiquidJS</title> <title>modulo | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -120,7 +120,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.049Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.982Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="minus.html" class="article-footer-prev" title="sidebar.filters.minus"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="newline_to_br.html" class="article-footer-next" title="sidebar.filters.newline_to_br"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="minus.html" class="article-footer-prev" title="sidebar.filters.minus"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="newline_to_br.html" class="article-footer-next" title="sidebar.filters.newline_to_br"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>newline_to_br | LiquidJS</title> <title>newline_to_br | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -114,7 +114,7 @@ there
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.050Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.982Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="modulo.html" class="article-footer-prev" title="sidebar.filters.modulo"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="normalize_whitespace.html" class="article-footer-next" title="sidebar.filters.normalize_whitespace"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="modulo.html" class="article-footer-prev" title="sidebar.filters.modulo"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="normalize_whitespace.html" class="article-footer-next" title="sidebar.filters.normalize_whitespace"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>normalize_whitespace | LiquidJS</title> <title>normalize_whitespace | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -108,7 +108,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.050Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.982Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="newline_to_br.html" class="article-footer-prev" title="sidebar.filters.newline_to_br"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="number_of_words.html" class="article-footer-next" title="sidebar.filters.number_of_words"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="newline_to_br.html" class="article-footer-prev" title="sidebar.filters.newline_to_br"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="number_of_words.html" class="article-footer-next" title="sidebar.filters.number_of_words"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>number_of_words | LiquidJS</title> <title>number_of_words | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -130,7 +130,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.050Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.982Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="normalize_whitespace.html" class="article-footer-prev" title="sidebar.filters.normalize_whitespace"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="plus.html" class="article-footer-next" title="sidebar.filters.plus"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="normalize_whitespace.html" class="article-footer-prev" title="sidebar.filters.normalize_whitespace"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="plus.html" class="article-footer-next" title="sidebar.filters.plus"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+1 -1
View File
@@ -142,7 +142,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.050Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.982Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="abs.html" class="article-footer-next" title="sidebar.filters.abs"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="abs.html" class="article-footer-next" title="sidebar.filters.abs"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>plus | LiquidJS</title> <title>plus | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -120,7 +120,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.050Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.982Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="number_of_words.html" class="article-footer-prev" title="sidebar.filters.number_of_words"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="pop.html" class="article-footer-next" title="sidebar.filters.pop"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="number_of_words.html" class="article-footer-prev" title="sidebar.filters.number_of_words"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="pop.html" class="article-footer-next" title="sidebar.filters.pop"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>pop | LiquidJS</title> <title>pop | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -115,7 +115,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.050Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.982Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="plus.html" class="article-footer-prev" title="sidebar.filters.plus"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="push.html" class="article-footer-next" title="sidebar.filters.push"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="plus.html" class="article-footer-prev" title="sidebar.filters.plus"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="push.html" class="article-footer-next" title="sidebar.filters.push"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>prepend | LiquidJS</title> <title>prepend | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -117,7 +117,7 @@ example.com/index.html<span aria-hidden="true" class="line-numbers-rows"><span><
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.050Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.983Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="push.html" class="article-footer-prev" title="sidebar.filters.push"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="raw.html" class="article-footer-next" title="sidebar.filters.raw"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="push.html" class="article-footer-prev" title="sidebar.filters.push"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="raw.html" class="article-footer-next" title="sidebar.filters.raw"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>push | LiquidJS</title> <title>push | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -116,7 +116,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.050Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.983Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="pop.html" class="article-footer-prev" title="sidebar.filters.pop"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="prepend.html" class="article-footer-next" title="sidebar.filters.prepend"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="pop.html" class="article-footer-prev" title="sidebar.filters.pop"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="prepend.html" class="article-footer-next" title="sidebar.filters.prepend"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>raw | LiquidJS</title> <title>raw | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -129,7 +129,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.050Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.983Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="prepend.html" class="article-footer-prev" title="sidebar.filters.prepend"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="reject.html" class="article-footer-next" title="sidebar.filters.reject"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="prepend.html" class="article-footer-prev" title="sidebar.filters.prepend"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="reject.html" class="article-footer-next" title="sidebar.filters.reject"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>reject | LiquidJS</title> <title>reject | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -186,7 +186,7 @@ Available products:
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.050Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.983Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="raw.html" class="article-footer-prev" title="sidebar.filters.raw"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="reject_exp.html" class="article-footer-next" title="sidebar.filters.reject_exp"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="raw.html" class="article-footer-prev" title="sidebar.filters.raw"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="reject_exp.html" class="article-footer-next" title="sidebar.filters.reject_exp"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>reject_exp | LiquidJS</title> <title>reject_exp | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -127,7 +127,7 @@ Kitchen products:
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.050Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.983Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="reject.html" class="article-footer-prev" title="sidebar.filters.reject"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="remove.html" class="article-footer-next" title="sidebar.filters.remove"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="reject.html" class="article-footer-prev" title="sidebar.filters.reject"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="remove.html" class="article-footer-next" title="sidebar.filters.remove"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>remove | LiquidJS</title> <title>remove | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -108,7 +108,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.050Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.983Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="reject_exp.html" class="article-footer-prev" title="sidebar.filters.reject_exp"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="remove_first.html" class="article-footer-next" title="sidebar.filters.remove_first"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="reject_exp.html" class="article-footer-prev" title="sidebar.filters.reject_exp"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="remove_first.html" class="article-footer-next" title="sidebar.filters.remove_first"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>remove_first | LiquidJS</title> <title>remove_first | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -108,7 +108,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.050Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.983Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="remove.html" class="article-footer-prev" title="sidebar.filters.remove"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="remove_last.html" class="article-footer-next" title="sidebar.filters.remove_last"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="remove.html" class="article-footer-prev" title="sidebar.filters.remove"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="remove_last.html" class="article-footer-next" title="sidebar.filters.remove_last"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>remove_last | LiquidJS</title> <title>remove_last | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -108,7 +108,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.050Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.983Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="remove_first.html" class="article-footer-prev" title="sidebar.filters.remove_first"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="replace.html" class="article-footer-next" title="sidebar.filters.replace"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="remove_first.html" class="article-footer-prev" title="sidebar.filters.remove_first"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="replace.html" class="article-footer-next" title="sidebar.filters.replace"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>replace | LiquidJS</title> <title>replace | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -108,7 +108,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.050Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.983Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="remove_last.html" class="article-footer-prev" title="sidebar.filters.remove_last"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="replace_first.html" class="article-footer-next" title="sidebar.filters.replace_first"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="remove_last.html" class="article-footer-prev" title="sidebar.filters.remove_last"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="replace_first.html" class="article-footer-next" title="sidebar.filters.replace_first"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>replace_first | LiquidJS</title> <title>replace_first | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -108,7 +108,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.050Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.983Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="replace.html" class="article-footer-prev" title="sidebar.filters.replace"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="replace_last.html" class="article-footer-next" title="sidebar.filters.replace_last"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="replace.html" class="article-footer-prev" title="sidebar.filters.replace"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="replace_last.html" class="article-footer-next" title="sidebar.filters.replace_last"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>replace_last | LiquidJS</title> <title>replace_last | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -108,7 +108,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.050Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.983Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="replace_first.html" class="article-footer-prev" title="sidebar.filters.replace_first"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="reverse.html" class="article-footer-next" title="sidebar.filters.reverse"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="replace_first.html" class="article-footer-prev" title="sidebar.filters.replace_first"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="reverse.html" class="article-footer-next" title="sidebar.filters.reverse"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>reverse | LiquidJS</title> <title>reverse | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -119,7 +119,7 @@ plums, peaches, oranges, apples<span aria-hidden="true" class="line-numbers-rows
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.050Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.983Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="replace_last.html" class="article-footer-prev" title="sidebar.filters.replace_last"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="round.html" class="article-footer-next" title="sidebar.filters.round"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="replace_last.html" class="article-footer-prev" title="sidebar.filters.replace_last"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="round.html" class="article-footer-next" title="sidebar.filters.round"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>round | LiquidJS</title> <title>round | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -120,7 +120,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.050Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.983Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="reverse.html" class="article-footer-prev" title="sidebar.filters.reverse"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="rstrip.html" class="article-footer-next" title="sidebar.filters.rstrip"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="reverse.html" class="article-footer-prev" title="sidebar.filters.reverse"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="rstrip.html" class="article-footer-next" title="sidebar.filters.rstrip"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>rstrip | LiquidJS</title> <title>rstrip | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -108,7 +108,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.050Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.983Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="round.html" class="article-footer-prev" title="sidebar.filters.round"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="shift.html" class="article-footer-next" title="sidebar.filters.shift"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="round.html" class="article-footer-prev" title="sidebar.filters.round"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="shift.html" class="article-footer-next" title="sidebar.filters.shift"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>sha256 | LiquidJS</title> <title>sha256 | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -109,7 +109,7 @@ My secret potion: <span class="token liquid language-liquid"><span class="token
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.050Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.983Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="overview.html" class="article-footer-next" title="Overview"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="overview.html" class="article-footer-next" title="Overview"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>shift | LiquidJS</title> <title>shift | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -115,7 +115,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.050Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.983Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="rstrip.html" class="article-footer-prev" title="sidebar.filters.rstrip"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="size.html" class="article-footer-next" title="sidebar.filters.size"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="rstrip.html" class="article-footer-prev" title="sidebar.filters.rstrip"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="size.html" class="article-footer-next" title="sidebar.filters.size"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>size | LiquidJS</title> <title>size | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -123,7 +123,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.050Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.983Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="shift.html" class="article-footer-prev" title="sidebar.filters.shift"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="slice.html" class="article-footer-next" title="sidebar.filters.slice"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="shift.html" class="article-footer-prev" title="sidebar.filters.shift"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="slice.html" class="article-footer-next" title="sidebar.filters.slice"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>slice | LiquidJS</title> <title>slice | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -128,7 +128,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.050Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.983Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="size.html" class="article-footer-prev" title="sidebar.filters.size"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="slugify.html" class="article-footer-next" title="sidebar.filters.slugify"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="size.html" class="article-footer-prev" title="sidebar.filters.size"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="slugify.html" class="article-footer-next" title="sidebar.filters.slugify"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>slugify | LiquidJS</title> <title>slugify | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -139,7 +139,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.050Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.983Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="slice.html" class="article-footer-prev" title="sidebar.filters.slice"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="sort.html" class="article-footer-next" title="sidebar.filters.sort"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="slice.html" class="article-footer-prev" title="sidebar.filters.slice"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="sort.html" class="article-footer-next" title="sidebar.filters.sort"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>sort | LiquidJS</title> <title>sort | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -118,7 +118,7 @@ Sally Snake, giraffe, octopus, zebra<span aria-hidden="true" class="line-numbers
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.050Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.983Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="slugify.html" class="article-footer-prev" title="sidebar.filters.slugify"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="sort_natural.html" class="article-footer-next" title="sidebar.filters.sort_natural"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="slugify.html" class="article-footer-prev" title="sidebar.filters.slugify"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="sort_natural.html" class="article-footer-next" title="sidebar.filters.sort_natural"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>sort_natural | LiquidJS</title> <title>sort_natural | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -118,7 +118,7 @@ giraffe, octopus, Sally Snake, zebra<span aria-hidden="true" class="line-numbers
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.050Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.983Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="sort.html" class="article-footer-prev" title="sidebar.filters.sort"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="split.html" class="article-footer-next" title="sidebar.filters.split"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="sort.html" class="article-footer-prev" title="sidebar.filters.sort"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="split.html" class="article-footer-next" title="sidebar.filters.split"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>split | LiquidJS</title> <title>split | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -122,7 +122,7 @@ Ringo<span aria-hidden="true" class="line-numbers-rows"><span></span><span></spa
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.050Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.983Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="sort_natural.html" class="article-footer-prev" title="sidebar.filters.sort_natural"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="strip.html" class="article-footer-next" title="sidebar.filters.strip"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="sort_natural.html" class="article-footer-prev" title="sidebar.filters.sort_natural"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="strip.html" class="article-footer-next" title="sidebar.filters.strip"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>strip | LiquidJS</title> <title>strip | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -108,7 +108,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.050Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.983Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="split.html" class="article-footer-prev" title="sidebar.filters.split"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="strip_html.html" class="article-footer-next" title="sidebar.filters.strip_html"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="split.html" class="article-footer-prev" title="sidebar.filters.split"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="strip_html.html" class="article-footer-next" title="sidebar.filters.strip_html"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>strip_html | LiquidJS</title> <title>strip_html | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -112,7 +112,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.050Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.983Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="strip.html" class="article-footer-prev" title="sidebar.filters.strip"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="strip_newlines.html" class="article-footer-next" title="sidebar.filters.strip_newlines"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="strip.html" class="article-footer-prev" title="sidebar.filters.strip"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="strip_newlines.html" class="article-footer-next" title="sidebar.filters.strip_newlines"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>strip_newlines | LiquidJS</title> <title>strip_newlines | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -114,7 +114,7 @@ Hellothere<span aria-hidden="true" class="line-numbers-rows"><span></span><span>
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.050Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.983Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="strip_html.html" class="article-footer-prev" title="sidebar.filters.strip_html"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="sum.html" class="article-footer-next" title="sidebar.filters.sum"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="strip_html.html" class="article-footer-prev" title="sidebar.filters.strip_html"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="sum.html" class="article-footer-next" title="sidebar.filters.sum"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>sum | LiquidJS</title> <title>sum | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -109,7 +109,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.050Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.983Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="strip_newlines.html" class="article-footer-prev" title="sidebar.filters.strip_newlines"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="times.html" class="article-footer-next" title="sidebar.filters.times"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="strip_newlines.html" class="article-footer-prev" title="sidebar.filters.strip_newlines"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="times.html" class="article-footer-next" title="sidebar.filters.times"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>times | LiquidJS</title> <title>times | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -120,7 +120,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.050Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.983Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="sum.html" class="article-footer-prev" title="sidebar.filters.sum"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="to_integer.html" class="article-footer-next" title="sidebar.filters.to_integer"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="sum.html" class="article-footer-prev" title="sidebar.filters.sum"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="to_integer.html" class="article-footer-next" title="sidebar.filters.to_integer"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>to_integer | LiquidJS</title> <title>to_integer | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -108,7 +108,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.050Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.984Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="times.html" class="article-footer-prev" title="sidebar.filters.times"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="truncate.html" class="article-footer-next" title="sidebar.filters.truncate"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="times.html" class="article-footer-prev" title="sidebar.filters.times"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="truncate.html" class="article-footer-next" title="sidebar.filters.truncate"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>truncate | LiquidJS</title> <title>truncate | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -123,7 +123,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.050Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.984Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="to_integer.html" class="article-footer-prev" title="sidebar.filters.to_integer"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="truncatewords.html" class="article-footer-next" title="sidebar.filters.truncatewords"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="to_integer.html" class="article-footer-prev" title="sidebar.filters.to_integer"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="truncatewords.html" class="article-footer-next" title="sidebar.filters.truncatewords"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>truncatewords | LiquidJS</title> <title>truncatewords | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -122,7 +122,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.050Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.984Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="truncate.html" class="article-footer-prev" title="sidebar.filters.truncate"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="uniq.html" class="article-footer-next" title="sidebar.filters.uniq"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="truncate.html" class="article-footer-prev" title="sidebar.filters.truncate"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="uniq.html" class="article-footer-next" title="sidebar.filters.uniq"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>uniq | LiquidJS</title> <title>uniq | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -109,7 +109,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.050Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.984Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="truncatewords.html" class="article-footer-prev" title="sidebar.filters.truncatewords"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="unshift.html" class="article-footer-next" title="sidebar.filters.unshift"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="truncatewords.html" class="article-footer-prev" title="sidebar.filters.truncatewords"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="unshift.html" class="article-footer-next" title="sidebar.filters.unshift"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>unshift | LiquidJS</title> <title>unshift | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -116,7 +116,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.050Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.984Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="uniq.html" class="article-footer-prev" title="sidebar.filters.uniq"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="upcase.html" class="article-footer-next" title="sidebar.filters.upcase"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="uniq.html" class="article-footer-prev" title="sidebar.filters.uniq"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="upcase.html" class="article-footer-next" title="sidebar.filters.upcase"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>upcase | LiquidJS</title> <title>upcase | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -114,7 +114,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.050Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.984Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="unshift.html" class="article-footer-prev" title="sidebar.filters.unshift"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="uri_escape.html" class="article-footer-next" title="sidebar.filters.uri_escape"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="unshift.html" class="article-footer-prev" title="sidebar.filters.unshift"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="uri_escape.html" class="article-footer-next" title="sidebar.filters.uri_escape"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>uri_escape | LiquidJS</title> <title>uri_escape | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -109,7 +109,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.050Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.984Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="upcase.html" class="article-footer-prev" title="sidebar.filters.upcase"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="url_decode.html" class="article-footer-next" title="sidebar.filters.url_decode"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="upcase.html" class="article-footer-prev" title="sidebar.filters.upcase"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="url_decode.html" class="article-footer-next" title="sidebar.filters.url_decode"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>url_decode | LiquidJS</title> <title>url_decode | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -108,7 +108,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.050Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.984Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="uri_escape.html" class="article-footer-prev" title="sidebar.filters.uri_escape"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="url_encode.html" class="article-footer-next" title="sidebar.filters.url_encode"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="uri_escape.html" class="article-footer-prev" title="sidebar.filters.uri_escape"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="url_encode.html" class="article-footer-next" title="sidebar.filters.url_encode"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>url_encode | LiquidJS</title> <title>url_encode | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -114,7 +114,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.050Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.984Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="url_decode.html" class="article-footer-prev" title="sidebar.filters.url_decode"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="where.html" class="article-footer-next" title="sidebar.filters.where"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="url_decode.html" class="article-footer-prev" title="sidebar.filters.url_decode"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="where.html" class="article-footer-next" title="sidebar.filters.where"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>where | LiquidJS</title> <title>where | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -195,7 +195,7 @@ Featured product: <span class="token liquid language-liquid"><span class="token
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.050Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.984Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="url_encode.html" class="article-footer-prev" title="sidebar.filters.url_encode"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="where_exp.html" class="article-footer-next" title="sidebar.filters.where_exp"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="url_encode.html" class="article-footer-prev" title="sidebar.filters.url_encode"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="where_exp.html" class="article-footer-next" title="sidebar.filters.where_exp"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>where_exp | LiquidJS</title> <title>where_exp | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -127,7 +127,7 @@ Kitchen products:
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.050Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.984Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="where.html" class="article-footer-prev" title="sidebar.filters.where"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="xml_escape.html" class="article-footer-next" title="sidebar.filters.xml_escape"><span>Next</span><i class="icon-chevron-right"></i></a> <a href="where.html" class="article-footer-prev" title="sidebar.filters.where"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="xml_escape.html" class="article-footer-next" title="sidebar.filters.xml_escape"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer> </footer>
</div> </div>
+2 -2
View File
@@ -5,7 +5,7 @@
<title>xml_escape | LiquidJS</title> <title>xml_escape | LiquidJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LiquidJS is a simple, expressive, and safe template engine for JavaScript, compatible with Shopify and GitHub Pages."> <meta name="description" content="A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net/">
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<!-- Canonical links --> <!-- Canonical links -->
@@ -108,7 +108,7 @@
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<time class="article-footer-updated" datetime="2026-06-22T12:11:25.050Z" itemprop="dateModified">Last updated: 2026-06-22</time> <time class="article-footer-updated" datetime="2026-06-23T09:39:34.984Z" itemprop="dateModified">Last updated: 2026-06-23</time>
<a href="where_exp.html" class="article-footer-prev" title="sidebar.filters.where_exp"><i class="icon-chevron-left"></i><span>Prev</span></a> <a href="where_exp.html" class="article-footer-prev" title="sidebar.filters.where_exp"><i class="icon-chevron-left"></i><span>Prev</span></a>
</footer> </footer>
</div> </div>
+21 -8
View File
File diff suppressed because one or more lines are too long
+119 -16
View File
@@ -38,8 +38,8 @@
(function() { (function() {
// playground // playground
/* global liquidjs, ace */ /* global liquidjs, ace, Prism */
if (!location.pathname.match(/playground.html$/)) return; if (!/\/playground(?:\.html)?$/.test(location.pathname)) return;
updateVersion(liquidjs.version); updateVersion(liquidjs.version);
const engine = new liquidjs.Liquid({ const engine = new liquidjs.Liquid({
memoryLimit: 1e5, memoryLimit: 1e5,
@@ -48,14 +48,19 @@
const colorScheme = window.matchMedia('(prefers-color-scheme: dark)'); const colorScheme = window.matchMedia('(prefers-color-scheme: dark)');
const editor = createEditor('editorEl', 'liquid'); const editor = createEditor('editorEl', 'liquid');
const dataEditor = createEditor('dataEl', 'json'); const dataEditor = createEditor('dataEl', 'json');
const preview = createEditor('previewEl', 'html'); const previewCode = document.getElementById('previewCode');
preview.setReadOnly(true); const indicatorTpl = document.querySelector('.area-tpl .pane-indicator');
preview.renderer.setShowGutter(false); const indicatorData = document.querySelector('.area-data .pane-indicator');
preview.renderer.setPadding(16); const indicatorOutput = document.querySelector('.area-output .pane-indicator');
const editors = [editor, dataEditor, preview]; const editors = [editor, dataEditor];
let previewValue = '';
let hadPreview = false;
let renderTimer = null;
const RENDER_DELAY = 180;
colorScheme.addEventListener('change', function() { colorScheme.addEventListener('change', function() {
editors.forEach(applyEditorTheme); editors.forEach(applyEditorTheme);
if (previewValue) setPreview(previewValue);
}); });
const init = parseArgs(location.hash.slice(1)); const init = parseArgs(location.hash.slice(1));
@@ -63,9 +68,11 @@
editor.setValue(init.tpl, 1); editor.setValue(init.tpl, 1);
dataEditor.setValue(init.data, 1); dataEditor.setValue(init.data, 1);
} }
editor.on('change', update); editor.on('change', onTemplateChange);
dataEditor.on('change', update); dataEditor.on('change', onContextChange);
update(); editor.on('focus', function () { setIndicator(indicatorTpl, 'active'); });
dataEditor.on('focus', function () { setIndicator(indicatorData, 'active'); });
scheduleUpdate();
ready(); ready();
function ready() { function ready() {
@@ -87,6 +94,8 @@
function applyEditorTheme(editor) { function applyEditorTheme(editor) {
editor.setTheme(getEditorTheme()); editor.setTheme(getEditorTheme());
editor.renderer.setPadding(0);
editor.container.style.background = 'transparent';
} }
function createEditor(id, lang) { function createEditor(id, lang) {
@@ -96,15 +105,61 @@
fontFamily: '"Source Code Pro", ui-monospace, Monaco, Menlo, Consolas, monospace', fontFamily: '"Source Code Pro", ui-monospace, Monaco, Menlo, Consolas, monospace',
fontSize: '14px', fontSize: '14px',
showPrintMargin: false, showPrintMargin: false,
showGutter: false,
highlightActiveLine: false,
tabSize: 2, tabSize: 2,
useSoftTabs: true, useSoftTabs: true,
scrollPastEnd: 0.25 scrollPastEnd: 0
}); });
editor.getSession().setMode('ace/mode/' + lang); editor.getSession().setMode('ace/mode/' + lang);
editor.renderer.setScrollMargin(8, 8, 0, 0); editor.renderer.setShowGutter(false);
if (editor.renderer.$gutter) {
editor.renderer.$gutter.style.display = 'none';
}
editor.renderer.setScrollMargin(0, 0, 0, 0);
bindClipboard(editor);
return editor; return editor;
} }
function bindClipboard(editor) {
editor.commands.addCommand({
name: 'copy',
bindKey: {win: 'Ctrl-C', mac: 'Command-C'},
exec: function (ed) {
const text = ed.getCopyText();
if (!text) return;
if (navigator.clipboard && window.isSecureContext) {
navigator.clipboard.writeText(text);
}
},
readOnly: true
});
editor.commands.addCommand({
name: 'cut',
bindKey: {win: 'Ctrl-X', mac: 'Command-X'},
exec: function (ed) {
const text = ed.getCopyText();
if (!text) return;
if (navigator.clipboard && window.isSecureContext) {
navigator.clipboard.writeText(text).then(function () {
ed.insert('');
});
}
}
});
editor.commands.addCommand({
name: 'paste',
bindKey: {win: 'Ctrl-V', mac: 'Command-V'},
exec: function (ed) {
if (navigator.clipboard && window.isSecureContext) {
navigator.clipboard.readText().then(function (text) {
ed.insert(text);
});
}
}
});
}
function parseArgs(hash) { function parseArgs(hash) {
if (!hash) return; if (!hash) return;
try { try {
@@ -118,16 +173,64 @@
return utoa(obj.tpl) + ',' + utoa(obj.data); return utoa(obj.tpl) + ',' + utoa(obj.data);
} }
function setPreview(value) {
previewValue = value;
previewCode.textContent = value;
if (window.Prism) {
delete previewCode.dataset.highlighted;
window.Prism.highlightElement(previewCode);
}
}
function setIndicator(indicator, state) {
if (indicator) indicator.dataset.state = state;
}
function onTemplateChange() {
setIndicator(indicatorTpl, 'active');
if (indicatorData.dataset.state !== 'error') setIndicator(indicatorData, 'idle');
setIndicator(indicatorOutput, 'pending');
scheduleUpdate();
}
function onContextChange() {
setIndicator(indicatorData, 'active');
if (indicatorTpl.dataset.state !== 'error') setIndicator(indicatorTpl, 'idle');
setIndicator(indicatorOutput, 'pending');
scheduleUpdate();
}
function scheduleUpdate() {
clearTimeout(renderTimer);
renderTimer = setTimeout(update, RENDER_DELAY);
}
async function update() { async function update() {
const tpl = editor.getValue(); const tpl = editor.getValue();
const data = dataEditor.getValue(); const data = dataEditor.getValue();
history.replaceState({}, '', '#' + serializeArgs({tpl, data})); history.replaceState({}, '', '#' + serializeArgs({tpl, data}));
let parsed;
try { try {
const html = await engine.parseAndRender(tpl, JSON.parse(data)); parsed = JSON.parse(data);
preview.setValue(html, 1);
} catch (err) { } catch (err) {
preview.setValue(err.stack, 1); setIndicator(indicatorData, 'error');
throw err; setIndicator(indicatorTpl, 'idle');
setIndicator(indicatorOutput, 'error');
return;
}
try {
const html = await engine.parseAndRender(tpl, parsed);
if (html !== '' || !hadPreview) {
setPreview(html);
if (html !== '') hadPreview = true;
}
setIndicator(indicatorTpl, 'idle');
setIndicator(indicatorData, 'idle');
setIndicator(indicatorOutput, 'ok');
} catch (err) {
setIndicator(indicatorTpl, 'error');
setIndicator(indicatorData, 'idle');
setIndicator(indicatorOutput, 'error');
} }
} }
+1 -1
View File
@@ -1,6 +1,6 @@
# LiquidJS # LiquidJS
> A simple, expressive and safe Shopify / Github Pages compatible template engine in pure JavaScript. > A simple, expressive, extensible Liquid template engine for JavaScript
## Tutorials ## Tutorials

Some files were not shown because too many files have changed in this diff Show More