use _.has instead of `in`
use object for code-point-to-glyph mapping instead of sparse array
use _.forEach instead of for(… in