1.0.0 • Published 13 years ago
simple-mixin
Licence
BSD
Version
1.0.0
Deps
0
Vulns
0
Weekly
0
Mixup
Simple mixin for node.js propgrams. Taken from the Testable Javascript Google Tech Talk
Installation
npm install -S simple-mixin'
Usage
var mixin = require('simple-mix')
var Base = function() {
this.name = 'base name'
}
Base.prototype.save = function() {
console.log('save called for name: ' + this.name)
}
var Extendable = function() {
this.name = 'extandable name'
}
var base = new Base()
var extendable = new Extendable()
mixin(base, extendable)
extendable.save()