javascript common tools