"use strict" ; /**
 * An interface for a JavaScript object that
 * acts a dictionary. The keys are strings.
 */ export interface IStringDictionary < V > { [ name ] : V ; } param what param from param alternate export function lookup < T > ( from , what , alternate ? ) ; export function lookup < T > ( from , what , alternate = null ) { const key = String ( what ) ; if ( contains ( from , key ) ) { return from [ key ] ; } return alternate ; } const hasOwnProperty = Object . prototype . hasOwnProperty ; /**
 * Returns {{true}} iff the provided object contains a property
 * with the given name.
 */ export function contains < T > ( from , what ) ; export function contains ( from , what ) { return hasOwnProperty . call ( from , what ) ; } /**
 * Iterates over each entry in the provided set. The iterator allows
 * to remove elements and will stop when the callback returns {{false}}.
 */ export function forEach < T > ( from , callback ) ; export function forEach < T > ( from , callback ) { for ( const key in from ) { if ( hasOwnProperty . call ( from , key ) ) { const result = callback ( { key : key , value : from [ key ] } , function ( ) { delete from [ key ] ; } ) ; if ( result === false ) { return ; } } } }