Misc bookkeeping and documentation

This commit is contained in:
Kim Ravn Hansen
2025-10-13 11:31:28 +02:00
parent ccb3cdb0ce
commit 53ea6e6386
5 changed files with 17 additions and 1 deletions

0
utils/dice.js Normal file → Executable file
View File

0
utils/id.js Normal file → Executable file
View File

0
utils/random.js Normal file → Executable file
View File

0
utils/regex.js Normal file → Executable file
View File

View File

@@ -8,6 +8,22 @@ export class TileOptions {
this.args = args;
}
/**
* @param {string} name
* @param {Record<string,any>} args
*/
static fromObject(name, args) {
//
const result = new TileOptions(name, []);
for (const [k, v] of Object.entries(args)) {
const arg = new TileArgs(k, v);
result.args.push(arg);
}
return result;
}
/**
* Find an arg by name, but fall back to an index position
*