/**
 * Helper utilities.
 *
 * Copyright (C) 2015 Martin Poelstra
 * License: MIT
 */ declare var global ; declare var self ; declare var window ; param { any } condition param { string } msg export function assert ( condition , msg ? ) { if ( ! condition ) { throw new Error ( msg ? "assertion failed: " + msg : "assertion failed" ) ; } } return { any } export function getGlobal ( ) { if ( typeof self !== "undefined" ) { return self ; } if ( typeof window !== "undefined" ) { return window ; } if ( typeof global !== "undefined" ) { return global ; } let g ; try { g = new Function ( "return this" ) ( ) ; } catch ( e ) { } return g ; }