Skip to content

dxprog/molecule.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Molecule.js It's yet another little library for making creating classes easy. It borrows a little bit from PHP, ember.js, and .NET.

Build Status

##Use

// Simple class
var MyClass = Molecule({
    __construct: function() {
        // The __construct function is called automatically when the object is instantiated via new
    }
});

// Extended class
var ExtendedClass = MyClass.extend({
    __construct: function() {
        // Call the parent __construct
        this.super.__construct.apply(this, arguments);
    }
});

// Multiple extension
var ExtendedClass = Molecule(MyClass, ExtendedClass, {
    __construct: function() {
        // Call the parent __construct
        this.super.__construct.apply(this, arguments);
    }
});

var instance = new ExtendedClass();

About

(Yet another) simple JS class library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published