Catalog npm
Back to packageRELEASE DETAILS

1.1.0

npm

52-deck

Make 52 cards deck

cardsdecknodejs
Published1 Apr 2017
Direct dependencies9
Transitive dependenciesNot calculated

README

Current package documentation

52-deck

build: Dependency Status devDependency Status

Installation (2.46 kB)

  • yarn add 52-deck
  • or npm install 52-deck

Usage

Get 52 cards deck

import { newDeck } from '52-deck'

const deck = newDeck()

Shuffle 2 decks

import { shuffle, newDecks } from '52-deck'

const deck = shuffle(newDecks(2))

Serialize

import { serializeCards } from '52-deck'

const [ firstCard, secondCard ] = serializeCards('♦K ♦2')

Valid input strings are:

  • h1 s1 d12
  • 11d 9s 9d 4s 12h 13d 13h 11h
  • ♠10 ♦1 ♥5 ♣6 ♠11 ♦10
  • 1-h 10-s
  • 12spades 8diamond

Card Model

type Card = {
  text: string,
  suite: string,
  value: number,
  color: string
}

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 9

Native requirements
9 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
babel-plugin-transform-class-properties
Environment
{
  "local_name": "babel-plugin-transform-class-properties",
  "alias": false,
  "peer_metadata": null
}
^6.23.0development
babel-plugin-transform-flow-strip-types
Environment
{
  "local_name": "babel-plugin-transform-flow-strip-types",
  "alias": false,
  "peer_metadata": null
}
^6.22.0development
babel-plugin-transform-object-rest-spread
Environment
{
  "local_name": "babel-plugin-transform-object-rest-spread",
  "alias": false,
  "peer_metadata": null
}
^6.23.0development
babel-preset-es2015
Environment
{
  "local_name": "babel-preset-es2015",
  "alias": false,
  "peer_metadata": null
}
^6.22.0development
flow-bin
Environment
{
  "local_name": "flow-bin",
  "alias": false,
  "peer_metadata": null
}
^0.42.0development
neutrino
Environment
{
  "local_name": "neutrino",
  "alias": false,
  "peer_metadata": null
}
^5.1.1development
neutrino-middleware-minify
Environment
{
  "local_name": "neutrino-middleware-minify",
  "alias": false,
  "peer_metadata": null
}
^5.1.0development
neutrino-preset-jest
Environment
{
  "local_name": "neutrino-preset-jest",
  "alias": false,
  "peer_metadata": null
}
^5.1.0development
neutrino-preset-node
Environment
{
  "local_name": "neutrino-preset-node",
  "alias": false,
  "peer_metadata": null
}
^5.1.0development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "shasum": "be5c0f88bf70450502f298ce9d057e3939669ab2",
  "tarball": "https://registry.npmjs.org/52-deck/-/52-deck-1.1.0.tgz",
  "integrity": "sha512-VqRLjFnh96QRWvOk6oHiIT+2rz9wxszAQyQr2oZeMUt3BTQygI+cr7R/8y1S//B6QHW6KlunxQYlWo1ouGaF3Q==",
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEYCIQCF/4IVbdjlKR5Fycb0YrwzQdrnDpYLWCqSvIchYL3a2QIhAL1H75XeKkScMJDiGKMHc0e1f1d3/adrjw28g9wVeGR3"
    }
  ]
}

Repository

PENDING
kedoska/52-deck

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 20:24 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:7c96c3f722c150a82bdef2e1d0d6951dc7db2d47d1d70fd88f100664b8a6803d

Other collected versions

1.0.031 MarView all collected versions →