MCPcopy Index your code
hub / github.com/es-shims/DisposableStack

github.com/es-shims/DisposableStack @v1.1.8

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.1.8 ↗ · + Follow
14 symbols 21 edges 34 files 0 documented · 0% 3 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

disposablestack Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

An ESnext spec-compliant DisposableStack, AsyncDisposableStack, Symbol.dispose, and Symbol.asyncDispose shim/polyfill/replacement that works as far down as ES3.

Its root auto entrypoint also provides SuppressedError, via the suppressed-error package.

This package implements the es-shim API “multi” interface. It works in an ES3-supported environment and complies with the proposed spec.

Getting started

npm install --save disposablestack

Usage/Examples

const assert = require('assert');

require('disposablestack/auto');

assert.equal(typeof Symbol.dispose, 'symbol');
assert.equal(typeof Symbol.asyncDispose, 'symbol');

const error = new SuppressedError();
assert.ok(error instanceof Error);

const stack = new DisposableStack();

const asyncStack = new AsyncDisposableStack();

// examples of stack methods

stack.dispose();

await asyncStack.disposeAsync();

// assert disposal was done

Tests

Clone the repo, npm install, and run npm test

Core symbols most depended-on inside this repo

Shape

Function 14

Languages

TypeScript100%

Modules by API surface

test/tests.js6 symbols
DisposableStack/implementation.js3 symbols
AsyncDisposableStack/implementation.js3 symbols
aos/DisposeResources.js2 symbols

Used by 3 indexed graphs manifest dependencies, hub-wide

For agents

$ claude mcp add DisposableStack \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page