common functions for javascript, eg. hasOwnProperty, formatDate ...