utility: show raw value for undoc flags

This commit is contained in:
Cynthia Foxwell 2023-10-07 22:40:31 -06:00
parent 9e4d458b0d
commit 0bc9e05da8

View file

@ -385,7 +385,9 @@ function flagsFromInt(int, flags, withRaw = true) {
for (const flag of assignedFlags) {
out.push(
`${flags[flag] ?? "<Undocumented Flag>"}${
withRaw == true ? ` (1 << ${flag}, ${1n << BigInt(flag)})` : ""
withRaw == true || flags[flag] == null
? ` (1 << ${flag}, ${1n << BigInt(flag)})`
: ""
}`
);
}