simple-mixin

1.0.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i simple-mixin

Weekly Downloads

3

Version

1.0.0

License

BSD

Last publish

Collaborators

  • clewfirst