5th edition, a library for 5th edition D&D applications.
npm install 5thnpm:```
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.
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:
`js
// 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]
}
}
``