A promise based Minecraft ping library.
Using promises:
const mcping = require( 'mc-ping-promise' );
mcping( 'example.com', 25565 )
.then( data => console.log( data ) )
.catch( err => console.log( err ) );
Using async/await:
const mcping = require( 'mc-ping-promise' );
try {
let data = await mcping( 'example.com', 25565 );
console.log( data );
} catch( err ) {
console.log( err );
}