some utils and testing about javascript