"use strict" ; class StopException { arg : any ; constructor ( arg ) { this . arg = arg ; } get message ( ) { return "stream stopped" ; } get stack ( ) { return "stream stopped\n\t<no stack trace>" ; } } export function unwrap ( ex ) { return ex instanceof StopException ? ex . arg : ex ; } export function make ( arg ) { return ( ! arg || arg === true ) ? new StopException ( arg ) : arg ; }