Catalog npm
PACKAGE EXPLORERView in registry

5th

npm

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

Versions collected6
Direct dependencies4From release 0.3.0
Last observed20 Oct, 20:40 UTC

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.

Versions 6

Collected releases
VersionPublishedDirect dependenciesOpen version
0.3.0Registry latest8 Nov 20174
0.2.28 Nov 20174
0.2.129 Oct 20174
0.2.024 Oct 20174
0.1.022 Oct 20174
0.0.021 Oct 20174

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

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:17224522502fee33967ea22011ace5514aeaa7c69cd96246ddfe5030b53b2e07