moleculejs

1.0.1 • Public • Published

#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();

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i moleculejs

Weekly Downloads

0

Version

1.0.1

License

ISC

Last publish

Collaborators

  • dxprog