Skip to content

dungeonmaker-js / dungeonmaker-js/node / renderName

Function: renderName() ​

renderName(template, values): string

Defined in: packages/dungeonmaker-js/src/node/name.ts:9

Fills a file name template. Placeholders: {name} and {seed}.

Parameters ​

template ​

string

values ​

name ​

string

seed ​

number

Returns ​

string

Throws ​

RangeError for an unknown placeholder, a path separator or .. in the result, and an empty result: the template must name a file, never a path.

DungeonMaker 2.05 © Peter Henningsen. WebAssembly port, package and site created by spearwolf. Released under GPL-3.0-or-later. About · License