import { isString } from './is' ; export const print = ( ... args ) => { const msgs = [ ] ; args . forEach ( o => { if ( isString ( o ) ) { msgs . push ( o ) ; } else { msgs . push ( JSON . stringify ( o , null , 2 ) ) ; } } ) ; console . log ( msgs . join ( ' ' ) ) ; } ; export const _ = ( o ) : any => { return JSON . stringify ( o , null , 2 ) ; } ; export const appendPath = ( newPath , oldPath ? ) => { let path = newPath ; if ( oldPath ) { path = oldPath . endsWith ( '[' ) || newPath === '[' ? `${ oldPath }${ newPath }` : `${ oldPath }.${ newPath }` ; } return path ; } ;