clean-jsdoc-theme API

forge

Source: index.js:120

Forge is a tiny, fictional toolkit for building event-driven data pipelines. It does not do anything real — it exists to show, on a single generated site, every JSDoc construct and every authoring component that clean-jsdoc-theme understands.

Use it as a living checklist: classes, interfaces, mixins, namespaces, typedefs, enums, events, constants, and globals are all here, and each pulls in a different slice of the theme's feature set.

Everything you're reading — this callout, the stepper below, the tabs, the table, and the embedded demo — is authored inline in a doc comment. The markers [!NOTE], [!TIP], [!IMPORTANT], [!WARNING], and [!CAUTION] each render as a differently-styled callout.

Reach for Cache when you need fast key/value storage, and Queue when you need ordered, event-driven task processing.

Quick start

  1. 1
    Create a cache

    Build a Cache, optionally capping how many entries it holds:

    CODE
    import { Cache } from 'forge';
    const cache = new Cache({ maxSize: 2 });
  2. 2
    Queue some work

    A Queue runs tasks in priority order and emits events as it drains:

    CODE
    import { Queue } from 'forge';
    const q = new Queue({ concurrency: 2 });
    q.on('drain', () => console.log('all done'));
  3. 3
    Wire them together

    Read-through a cache from inside a queued task and you have a tiny pipeline.

Install

CODE
npm install --save-dev jsdoc clean-jsdoc-theme

What's in the box

SymbolKindHighlights it demonstrates
Cacheclassconstructor, getters, @deprecated, @fires, @playground
Queueclass@extends, events, @async, @generator, @abstract
Storeinterface@interface + @implements
Timestampedmixin@mixin + @mixes
textnamespace@namespace + @borrows
Priorityenum@enum rendered as a member table

Roadmap

  • [x] Caching primitives
  • [x] Event-driven queue
  • [ ] Persistent backends
  • [ ] Streaming transforms

Live demo

The embed below is authored with the @iframe block tag (see the module's source) — it points at this very site and re-themes itself when you flip light/dark. In prose (README, tutorials, the docs folder) you can author the same thing with a ```iframe fenced code block instead.

  • Since: 1.0.0
  • License: MIT
  • Author: The clean-jsdoc-theme team
  • See:

Other

VERSION

The current Forge version. A module-level constant rendered with a Type and Default row.

Type

string