Catalog npm
Back to packageRELEASE DETAILS

1.0.0

npm

52-deck

Make 52 cards deck

cardsdecknodejs
Published31 Mar 2017
Direct dependencies10
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 10

Native requirements
10 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
}
^4.3.1development
neutrino-middleware-minify
Environment
{
  "local_name": "neutrino-middleware-minify",
  "alias": false,
  "peer_metadata": null
}
^5.0.0-beta.1development
neutrino-preset-jest
Environment
{
  "local_name": "neutrino-preset-jest",
  "alias": false,
  "peer_metadata": null
}
^4.3.0development
neutrino-preset-node
Environment
{
  "local_name": "neutrino-preset-node",
  "alias": false,
  "peer_metadata": null
}
^4.2.2development
neutrino-preset-standard
Environment
{
  "local_name": "neutrino-preset-standard",
  "alias": false,
  "peer_metadata": null
}
^4.3.3development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "shasum": "7197f72e1a0714097fcfd61c8e30bacdad609848",
  "tarball": "https://registry.npmjs.org/52-deck/-/52-deck-1.0.0.tgz",
  "integrity": "sha512-qd1SfEfYHxNOUj8VawVT414B4xqj2wYk5xAjIgb1JAF06J3cBqZimbwnEijWuASJDR7BMW7n6HOq1rbliukh2A==",
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEUCIQCc7o1H6uXQU041mpKhUG9Kti1453iKeZ1RKs71Zb3VXgIgPbWHHc1bbq21vAIpMt8v/4jdDvjM9wdqiIalMQXSoyY="
    }
  ]
}

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:b566764437677e5173975977f7f69de054e7348ded14dc2279c09749e2c8fba2

Other collected versions

1.1.01 AprView all collected versions →