From a9dd6ff4172512d588e3959012aad9036e83467e Mon Sep 17 00:00:00 2001 From: xzeldon Date: Tue, 11 Jan 2022 02:33:30 +0300 Subject: [PATCH] =?UTF-8?q?docs:=20=D1=81hanged=20the=20module=20name=20ac?= =?UTF-8?q?cording=20to=20the=20scope?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index b5c95af..7a4d2e4 100644 --- a/README.md +++ b/README.md @@ -19,16 +19,16 @@ npm i @minescope/mineping ### ES Modules (ESM) ```js -import { pingJava, pingBedrock } from 'mineping'; +import { pingJava, pingBedrock } from '@minescope/mineping'; ``` ### CommonJS -`mineping` is an ESM-only module - you are not able to import it with `require()`. +`mineping` is an ESM-only module — you are not able to import it with `require()`. If you cannot switch to ESM, you can use the async `import()` function from CommonJS to load `mineping` asynchronously: ```js -const pingJava = (...args) => import('mineping').then(module => module.pingJava(...args)); -const pingBedrock = (...args) => import('mineping').then(module => module.pingBedrock(...args)); +const pingJava = (...args) => import('@minescope/mineping').then(module => module.pingJava(...args)); +const pingBedrock = (...args) => import('@minescope/mineping').then(module => module.pingBedrock(...args)); ``` ## Usage @@ -36,7 +36,7 @@ const pingBedrock = (...args) => import('mineping').then(module => module.pingBe Ping a Java server with default options: ```js -import { pingJava } from 'mineping'; +import { pingJava } from '@minescope/mineping'; const data = await pingJava('mc.hypixel.net'); console.log(data); @@ -45,7 +45,7 @@ console.log(data); Ping a Bedrock server with custom options: ```js -import { pingBedrock } from 'mineping'; +import { pingBedrock } from '@minescope/mineping'; const data = await pingBedrock('mco.mineplex.com', { port: 19132,