8ball-pl

8ball to mały wróżbita. 8ball is a little fortune teller.

Usage no npm install needed!

<script type="module">
  import ballPl from 'https://cdn.skypack.dev/8ball-pl';
</script>

README



NPM version NPM downloads

npm installnfo

8ball

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:

const ball = require("8ball-pl")

console.log(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 your own or built-in visits. Here is the sample code:

const ball = require ("8ball-pl")

console.log(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!