JavaScript lightweight and modularized framework