Skip to main content

Deck

getCard​

Get card which will be drawn next

import { getCard } from "toranpu";

getCard(deck)

Arguments​

  • deck (Array): A deck of cards

Returns​

(Union) A card from the top of the deck or null if deck is empty