---
title: "Is the collection empty?"
description: "Check if a collection is empty in TypeScript."
date: "2025-10-02"
tags: ["typescript","collection","frontend"]
canonical: "/snippets/typescript/function/is-empty"
---

import { Code } from '@astrojs/starlight/components'
import Source from './is-empty.ts?raw'

## Is the collection empty?

<Code code={Source} lang="ts" title="is-empty.ts" wrap />
