import { networkInterfaces } from 'os' ; export function getOpenHost ( ) { let result ; const interfaces = networkInterfaces ( ) ; for ( const devName in interfaces ) { const isEnd = interfaces [ devName ] ?. some ( item => { if ( item . family === 'IPv4' && item . address !== '127.0.0.1' && ! item . internal ) { result = item . address ; return true ; } return false ; } ) ; if ( isEnd ) { break ; } } return result ; } export const PLAYGROUNDREPO = 'https://github.com/wuba/taro-playground' ; export const PLAYGROUNDINFO = `use [Taro Playground App](${ PLAYGROUNDREPO }) to scan` ;