import * as os from 'os' ; import { execSync } from 'child_process' ; /**
 * Class with utilitary methods.
 */ export class Utils { return { string } public static detectPlatform ( ) { return os . platform ( ) . toLowerCase ( ) ; } return { string } public static chcp ( ) { return execSync ( 'chcp' ) . toString ( ) . split ( ':' ) [ 1 ] . trim ( ) ; } param { Buffer } command public static execute ( command ) { return execSync ( command , { windowsHide : true , encoding : 'buffer' } ) ; } }