node package manager


Object system for common usage; Base object class, Q.Object with power of extension, mixin, creation


A extensible object system for both server end and client end. Part of Project Q. A universal application frameworks for enterprise JavaScript!

We have a powerful base object, you can mix-in any properties.

	var foo = Q.Object.create({
		"bar": ""

All class derive from Q.Object

	var Bar = Q.Object.extend({
		"props": "value"

	var Foo = Bar.extend({
		"props": "value1",
		"nice": "day"
	var Cow = Foo.extend(Speakable, Lovable, {
	  "name": "A Cow"

Using #create method or new keyword

	var bar = Bar.create();
	var foo = new Foo();

You can pass a hash to override its default properties.

	var foo1 = new Foo({
		"props": "value2"

You can access the overridden method by arguments.callee.base

	var SuperFoo = Foo.extend({
		foo: function() {}
	var SuperFooBar = SuperFoo.extend({
		foo: function() {
			//call super!
			arguments.callee.base.apply(this, arguments);
			//my own logics

Object designator using newly introduced API in Javascript 1.8.5: