It seems like a neat idea; it's not the normal Javascript way of operating, but sometimes classes do make more sense. I don't really get why you did Singletons, though. Why not just use a normal object?
Admittedly, others might not run into these situations, but it's happened to me frequently enough to include it.
singleton = Object()
singleton.x = 0
singleton.foo = function(){
return x + 1
}
Edit: Also, why not http://www.prototypejs.org/ ? Not that there's anything wrong with playing around with stuff of course.I use prototype on a day to day basis and I'm not a huge fan. Mootools has captured my attention as being a better alternative, and some of the code was taken from mootools. This is just classes though, not a full JS library.
var singleton = function (args) {
/*object constructor stuff*/
}(arg-values)I talk a bit more about what I'm trying to fix earlier: http://justin.harmonize.fm/index.php/2008/12/a-better-object...