0.0.0 • Published 10 years ago

class-con-leche v0.0.0

Weekly downloads
19
License
MIT
Repository
-
Last release
10 years ago

A simple backbone inspired, coffee compatible class object for node.js and the browser.

  • No bs, just the basics.
  • Compatible with CommonJS, AMD, and browser global style modules.
Class = require( 'class-con-leche' );

Walrus = Class.extend( {
	initialize : function() {
		// initialize is called when class instance is created
		console.log( 'I am a baby walrus' );
	},

	helloWorld : function() {
		console.log( 'I am a walrus' );
	}
} );

AngryWalrus = Class.extend( {
	helloWorld : function() {
		Walrus.prototype.myFunction(); // call super.. no syntactical sugar here.

		console.log( 'Get lost!' );
	}
} );