Files
NapCatQQ/.pnpm-store/v3/files/ea/3262701a075217eed5e518ee06f9fa919a12cb8c72fb8c8dc3a4d13892cd360de97d0c6db4ec7ed57f68284ff083097ceb0dde216cdb90c771520e266e0c22
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

18 lines
713 B
Plaintext

import { Parse } from './parse.mjs';
// ------------------------------------------------------------------
// Module
// ------------------------------------------------------------------
export class Module {
constructor(properties) {
this.properties = properties;
}
/** Parses using one of the parsers defined on this instance */
Parse(...args) {
// prettier-ignore
const [key, content, context] = (args.length === 3 ? [args[0], args[1], args[2]] :
args.length === 2 ? [args[0], args[1], undefined] :
(() => { throw Error('Invalid parse arguments'); })());
return Parse(this.properties, this.properties[key], content, context);
}
}