dungeonmaker-js / dungeonmaker-js/node / parseSeeds
Function: parseSeeds()
parseSeeds(
spec):number[]
Defined in: packages/dungeonmaker-js/src/node/seeds.ts:27
Parses a seed specification: "42", a range "1..50", a list "1,5,9" or a mix "1..3,7". Duplicates are dropped, the first occurrence keeps its place.
Parameters
spec
string
Returns
number[]
Throws
RangeError (naming the input) for anything else, for seeds outside 1 … 2³²−1, for descending ranges and for more than MAX_SEEDS_PER_RUN seeds.
