Some js utils