import { isObject } from 'lodash' ; export class ConfigUtils { public static jsonParser ( content , defaultValue = { } ) { try { if ( typeof content === 'string' ) { return JSON . parse ( content ) ; } return isObject ( content ) ? content : defaultValue ; } catch ( e ) { return defaultValue ; } } param stepList param step public static getStepConfig = ( stepList , step ) => stepList . find ( ( i ) => i . step === step ) ; }