htmlhelper: add css role
underscore: port some function to []int type from underscore.js