The mask of a named scale, or undefined when the name is not one.
Names of NAMED_SCALES, of WORLD_SCALES and of SCALE_ALIASES all answer here, so a caller never has to know which register a scale is kept in.
Looking the name up through this helper is what keeps 'constructor' or 'toString' from resolving to something inherited from Object.prototype and producing a scale whose mask is a function.
'constructor'
'toString'
Object.prototype
The scale name or alias.
The 12-bit mask, or undefined for an unknown name.
The mask of a named scale, or undefined when the name is not one.
Names of NAMED_SCALES, of WORLD_SCALES and of SCALE_ALIASES all answer here, so a caller never has to know which register a scale is kept in.
Looking the name up through this helper is what keeps
'constructor'or'toString'from resolving to something inherited fromObject.prototypeand producing a scale whose mask is a function.