schrö    Archive    Feed    About

Defining Functions dynamically in Javascript

While playing with some javascript and think about how o create a simple OR mapper for JS client databases, I was in need for defining functions dynamically in in JS.
As far as I know there is no common build in function to do something like this. From Ruby you might know the define_method-method. I tried to build something similar in JS. So this is what I got:

Feel free to tell me if this is crap or hot,