Doing Python-style imports in JavaScript

{ Posted on Mar 15 2006 by david }
Categories : Programming, Python

Lately at work I’ve been doing a lot of programming in JavaScript. Among other things, I have been learning about using the prototype object to do object oriented programming. One thing that I missed was the feature in Python used to import modules directly into other code. For example:

from glorp import blah
import foo

I was happy to have found an open-source project which emulates that functionality in JavaScript! I haven’t been able to do more than skim the web site, but it looks promising.

Resources

Post a Comment