JSPM

@hazae41/disposable-stack-polyfill

2.0.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 45
  • Score
    100M100P100Q66138F
  • License MIT

Polyfill for DisposableStack and AsyncDisposableStack

Package Exports

  • @hazae41/disposable-stack-polyfill

Readme

DisposableStack and AsyncDisposableStack polyfill

Polyfill for DisposableStack and AsyncDisposableStack

npm install @hazae41/disposable-stack-polyfill
deno install jsr:@hazae41/disposable-stack-polyfill

📦 NPM📦 JSR

Usage

How?

import "@hazae41/disposable-stack-polyfill"

Where?

You can import the polyfill in your project entry file or in a specific file, you just need to import it before anything that requires DisposableStack

(e.g. For a Next.js app, it can be in _app.js)

/**
 * This polyfill at the top
 **/
import "@hazae41/disposable-stack-polyfill"

/**
 * Your imports that requires DisposableStack to work
 **/
import { a } from "a"
import { b } from "./b.js"

/**
 * Your code that requires DisposableStack to work
 **/
using x = new DisposableStack()