modified format type.js