js functions like google jscs