UNPKG

axolemma

Version:

A tool to procedurally generate areas compatible with the Ranvier MUD engine.

16 lines (15 loc) 279 B
module.exports = { toInteger (input) { return parseInt(input, 10) }, toPercentage (input) { if (input < 1) { return input } return input / 100 }, toArrayOfNumbers (input) { return input.split(',') .map(s => parseInt(s.trim(), 10)) } }