js class generator