javascript utility tools