import * as tsrPkgInfo from 'timeline-state-resolver-types/package.json' ; deprecated export const TMP_TSR_VERSION = tsrPkgInfo . version ; export enum iterateDeeplyEnum { CONTINUE = '$continue' } param obj param iteratee export function iterateDeeply ( obj , iteratee , key ? ) { const newValue = iteratee ( obj , key ) ; if ( newValue === iterateDeeplyEnum . CONTINUE ) { if ( obj && typeof obj === 'object' ) { if ( Array . isArray ( obj ) ) { obj . forEach ( ( v , k ) => { obj [ k ] = iterateDeeply ( v , iteratee , k ) ; } ) ; } else { for ( const [ k , v ] of Object . entries ( obj ) ) { obj [ k ] = iterateDeeply ( v , iteratee , k ) ; } } } else { } return obj ; } else { return newValue ; } } param obj param iteratee export async function iterateDeeplyAsync ( obj , iteratee , key ? ) { const newValue = await iteratee ( obj , key ) ; if ( newValue === iterateDeeplyEnum . CONTINUE ) { if ( obj && typeof obj === 'object' ) { if ( Array . isArray ( obj ) ) { await Promise . all ( obj . map ( async ( v , k ) => { obj [ k ] = await iterateDeeplyAsync ( v , iteratee , k ) ; } ) ) ; } else { await Promise . all ( Object . entries ( obj ) . map ( async ( [ k , v ] ) => { obj [ k ] = await iterateDeeplyAsync ( v , iteratee , k ) ; } ) ) ; } } else { } return obj ; } else { return newValue ; } }