UNPKG
axolemma
Version:
latest (0.5.3)
0.5.3
0.5.2
0.5.1
0.5.0
0.4.1
0.4.0
0.3.1
0.3.0
0.2.0
A tool to procedurally generate areas compatible with the Ranvier MUD engine.
axolemma
/
bin
/
filters.js
16 lines
(15 loc)
•
279 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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
)) } }