UNPKG

disposablestack

Version:

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

8 lines (5 loc) 193 B
'use strict'; var implementation = require('./implementation'); module.exports = function getPolyfill() { return typeof DisposableStack === 'function' ? DisposableStack : implementation; };