Catalog npm
Back to packageRELEASE DETAILS

0.2.0

npm

5th

5th edition, a library for 5th edition D&D applications.

Published24 Oct 2017
Direct dependencies4
Transitive dependenciesNot calculated

README

Current package documentation

5th

This project creates objects which anyone can use with another JavaScript-based 5th edition application to handle common use cases, like making a character, handling combat or even planning an encounter.

Usage

To use this library in your application, simply include it with npm:

npm i --save 5th

You will need to provide your own response handler, handler factory, entity gateway and gateway factory objects if required. They will need to respond to a specific set of methods. We will denote details here later.

Handler Factory

You must implement a single object in your codebase with a "make" method which takes a string and generates an object with a "handle" method which takes an object and operates on it. An example:

// HandlerFactory.js
const handlers = {
  'select race': {
    handle({ character }) {
      // do something with the character and its newly created race
    }
  }
}

module.exports = class {
  make(type) {
    if (!handlers.hasOwnProperty(type)) {
      // throw an error of some sort
    }
    return handlers[type]
  }
}

Downloads & popularity

Awaiting observations

No metric observations yet

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

Declared dependencies 4

Native requirements
4 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
chai
Environment
{
  "local_name": "chai",
  "alias": false,
  "peer_metadata": null
}
^4.1.2development
istanbul
Environment
{
  "local_name": "istanbul",
  "alias": false,
  "peer_metadata": null
}
^0.4.5development
mocha
Environment
{
  "local_name": "mocha",
  "alias": false,
  "peer_metadata": null
}
^4.0.1development
sinon
Environment
{
  "local_name": "sinon",
  "alias": false,
  "peer_metadata": null
}
^4.0.1development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "integrity": "sha512-v6kHnzdwJS4SRPP8F1HiiWoC3GIdLS961gNDjI1WeEhDvucG0BqFnpGgtxosjI5/byPTkVXRU5JISvZFd8kZ/w==",
  "shasum": "b29644b425ab61f7842989807fde66543987a756",
  "tarball": "https://registry.npmjs.org/5th/-/5th-0.2.0.tgz",
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEQCIENuCLkCUMUZdPK0ho0hDc5D2gr5AsNobyTuexAeW8HuAiA+Z9Hkw8UpebxamHuCkQiOgn6Lbe9guRoEi+6hu/LK5A=="
    }
  ]
}

Repository

PENDING
ryayak1460/5th

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 20:40 UTC

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

Record identity

package_version:3a6f6dc2fc51108761fe76b09115bb0beae20c3cd48edf367e0c78c65e1e1d10

Other collected versions

0.3.08 Nov0.2.28 Nov0.2.129 Oct0.1.022 Oct0.0.021 OctView all collected versions →