1.0.1 • Published 2 years ago

@miidev/8ball v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

MiiDev's 8ball NodeJS Package

Import

const ball = require("@miidev/8ball");

Polski

8ball to mały wróżbita. W tej paczce możesz używać go do losowania odpowiedzi własnych lub wbudowanych. Oto przykładowy kod:

ball.pl();

Zwróci nam on losową wbudowaną odpowiedź na pytanie typu tak/nie. Możesz też użyć:

ball.own(["Tak", "Nie"])

Zwróci to losową odpowiedź - tak lub nie. W tym wypadku możesz dodać różne słowa, a paczka wybierze jedno z nich. Jest to po prostu prostsza wersja tego kodu:

answers[Math.floor(Math.random() * answers.length)];

Dobrej zabawy!

English

8ball is a little fortune teller. In this package you can use it to draw one of your own or built-in answers. Here is the sample code:

ball.en();

It will give us a random built-in answer to a yes/no question. You can also use:

ball.own(["Yes", "No"]);

It will return a random answer - yes or no. In this case, you can add different words and the package will choose one of them. It's just a simpler version of this code:

answers[Math.floor(Math.random() * answers.length)];

Enjoy!