# content-entry

> content entries for content containers (aka files)

Latest version **15.0.3** (published 2026-09-19) · 0BSD license · 0 weekly downloads

## Install

```sh
npm install content-entry
pnpm add content-entry
yarn add content-entry
bun add content-entry
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 15.0.3 |
| Published | 2026-09-19 |
| First published | 2018-12-13 |
| Weekly downloads | 0 |
| License | 0BSD |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=26.7.0 |
| Dependencies | 1 |
| Unpacked size | 33.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 0 |
| Maintainers | arlac77 |
| Keywords | content, directory, file, filesystem, stat |

## Links

- npm: https://www.npmjs.com/package/content-entry
- Repository: https://github.com/arlac77/content-entry
- Homepage: https://github.com/arlac77/content-entry#readme
- Issues: https://github.com/arlac77/content-entry/issues
- npm.io page: https://npm.io/package/content-entry

## Dependencies (1)

- [browser-stream-util](https://npm.io/package/browser-stream-util.md) ^1.3.6

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 15.0.3 (latest) — 2026-09-19
- 8.1.3 (next) — 2024-02-19
- 15.0.2 — 2026-08-24
- 15.0.1 — 2026-08-24
- 15.0.0 — 2026-08-24
- 14.2.7 — 2025-11-26
- 14.2.6 — 2025-11-25
- 14.2.5 — 2025-09-12
- 14.2.4 — 2025-08-04
- 14.2.3 — 2025-05-28
- 14.2.2 — 2025-05-18
- 14.2.1 — 2025-05-14
- 14.2.0 — 2025-05-14
- 14.1.3 — 2025-05-13
- 14.1.2 — 2025-05-13
- … 162 more at https://npm.io/package/content-entry/versions

## README

[![npm](https://img.shields.io/npm/v/content-entry.svg)](https://www.npmjs.com/package/content-entry)
[![License](https://img.shields.io/badge/License-0BSD-blue.svg)](https://spdx.org/licenses/0BSD.html)
[![Typed with TypeScript](https://flat.badgen.net/badge/icon/Typed?icon=typescript\&label\&labelColor=blue\&color=555555)](https://typescriptlang.org)
[![bundlejs](https://deno.bundlejs.com/?q=content-entry\&badge=detailed)](https://bundlejs.com/?q=content-entry)
[![downloads](http://img.shields.io/npm/dm/content-entry.svg?style=flat-square)](https://npmjs.org/package/content-entry)
[![GitHub Issues](https://img.shields.io/github/issues/arlac77/content-entry.svg?style=flat-square)](https://github.com/arlac77/content-entry/issues)
[![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Farlac77%2Fcontent-entry%2Fbadge\&style=flat)](https://actions-badge.atrox.dev/arlac77/content-entry/goto)
[![Styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
[![Known Vulnerabilities](https://snyk.io/test/github/arlac77/content-entry/badge.svg)](https://snyk.io/test/github/arlac77/content-entry)

## content-entrycontent entries for content containers (aka files)

# API<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

### Table of Contents*   [CollectionEntryMixin](#collectionentrymixin)
    *   [Parameters](#parameters)
*   [BaseEntry](#baseentry)
    *   [Parameters](#parameters-1)
    *   [Properties](#properties)
    *   [types](#types)
    *   [isCollection](#iscollection)
    *   [isBlob](#isblob)
    *   [mode](#mode)
    *   [isEmpty](#isempty)
    *   [isDeleted](#isdeleted)
    *   [isExistent](#isexistent)
    *   [equals](#equals)
        *   [Parameters](#parameters-2)
*   [BufferContentEntryMixin](#buffercontententrymixin)
    *   [Parameters](#parameters-3)
    *   [Properties](#properties-1)
*   [BufferContentEntry](#buffercontententry)
    *   [Parameters](#parameters-4)
    *   [isEmpty](#isempty-1)
    *   [size](#size)
*   [ContentEntry](#contententry)
    *   [isBlob](#isblob-1)
    *   [types](#types-1)
    *   [readStream](#readstream)
    *   [string](#string)
    *   [buffer](#buffer)
    *   [encoding](#encoding)
    *   [equalsContent](#equalscontent)
        *   [Parameters](#parameters-5)
    *   [getReadStream](#getreadstream)
*   [DeletedContentEntry](#deletedcontententry)
    *   [isDeleted](#isdeleted-1)
    *   [isExistent](#isexistent-1)
*   [EmptyContentEntry](#emptycontententry)
    *   [string](#string-1)
    *   [buffer](#buffer-1)
    *   [readStream](#readstream-1)
*   [toReadableStream](#toreadablestream)
    *   [Parameters](#parameters-6)
*   [ReadableStreamContentEntry](#readablestreamcontententry)
    *   [Parameters](#parameters-7)
    *   [Properties](#properties-2)
*   [StreamContentEntryMixin](#streamcontententrymixin)
    *   [Parameters](#parameters-8)
*   [StringContentEntryMixin](#stringcontententrymixin)
    *   [Parameters](#parameters-9)
    *   [Properties](#properties-3)
*   [StringContentEntry](#stringcontententry)
    *   [Parameters](#parameters-10)
    *   [Properties](#properties-4)
    *   [isEmpty](#isempty-2)
*   [equalsUint8Arrays](#equalsuint8arrays)
    *   [Parameters](#parameters-11)## CollectionEntryMixinBrings directory attributes to entries.### Parameters*   `superclass` &#x20;## BaseEntryRepresentation of one file or directory entry.
All names are absolute (no leading '/') the group seperator is '/'.### Parameters*   `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** name inside of the container### Properties*   `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** name inside of the container### typesReturns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** UTI types### isCollectionReturns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** false### isBlobReturns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** false### modeDefault unix mode for files.Returns **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** 0644### isEmptyReturns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true if there is no content (length := 0).### isDeletedReturns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true if we represent a deleted entry### isExistentReturns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true if we exist### equals#### Parameters*   `other` &#x20;Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)>** true if name, isBlob and isCollection are the same## BufferContentEntryMixinContent entries where a Uint8Array is the primary data representation.### Parameters*   `superclass` &#x20;### Properties*   `buffer` **[Uint8Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)**&#x20;## BufferContentEntry**Extends BufferContentEntryMixin(ContentEntry)**ConentEntry with a Uint8Array as content store.### Parameters*   `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**&#x20;
*   `buffer` **[Uint8Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)**&#x20;### isEmptyReturns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true if buffer length is zero### sizeReturns **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** size in bytes## ContentEntry**Extends BaseEntry**General content access entries.### isBlobReturns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true### typesUTI types for this entry.
defaults to "public.content".Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** ### readStreamReturns **any** undefined### stringReturns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** ### bufferreturn {Uint8Array}### encodingThe default encoding used to convert content to strings.Returns **BufferEncoding** ### equalsContentCompare content against other entry.#### Parameters*   `other` **[ContentEntry](#contententry)**&#x20;Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)>** true if other has the same content (bitwise)### getReadStream**Meta***   **deprecated**: This is deprecated.## DeletedContentEntry**Extends EmptyContentEntry**Represents a deleted entry.### isDeletedWe are always deleted.Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true### isExistentNothing there any more.Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** false## EmptyContentEntry**Extends ContentEntry**Represents a entry without content (content length = 0).### stringReturns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** ### bufferReturns **[Uint8Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)** zero length buffer### readStreamReturns **ReadableStream** zero length stream.## toReadableStream### Parameters*   `input` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**&#x20;Returns **Readable** ## ReadableStreamContentEntry**Extends StreamContentEntryMixin(ContentEntry)**Content entries where a readable stream is the primary data representation.### Parameters*   `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**&#x20;
*   `readStream` **ReadableStream**&#x20;### Properties*   `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**&#x20;
*   `readStream` **ReadableStream**&#x20;## StreamContentEntryMixinContent entries where a stream is the primary data representation.### Parameters*   `superclass` &#x20;## StringContentEntryMixinContent entries where a string is the primary data representation.### Parameters*   `superclass` &#x20;### Properties*   `string` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**&#x20;## StringContentEntry**Extends StringContentEntryMixin(ContentEntry)**Content entries where a string is the primary data representation.### Parameters*   `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**&#x20;
*   `value` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**&#x20;### Properties*   `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**&#x20;
*   `string` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**&#x20;### isEmptyReturns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true if string length is zero## equalsUint8ArraysReturns true if the two passed Uint8Arrays have the same content### Parameters*   `a` **[Uint8Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)**&#x20;
*   `b` **[Uint8Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)**&#x20;Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true if content of a equals b

# install

With [npm](http://npmjs.org) do:

    ```shell
npm install content-entry
    ```

# license

BSD-2-Clause

---
_Source: https://npm.io/package/content-entry · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
