BetterScript is a new approach at web design that utilizes multiple JavaScript interpreters with sandboxed contexts to containerize each library. Although this approach requires some rewriting, it allows code to be modular while not requiring much work to adopt into new projects.
You can find a simple hosted demo of BetterScript containerization features at BetterScript Sandbox