Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nisaacson/simple-mixin

Simple mixin for node.js propgrams. Taken from the [Testable Javascript](http://youtu.be/JjqKQ8ezwKQ) Google Tech Talk
https://github.com/nisaacson/simple-mixin

Last synced: about 1 month ago
JSON representation

Simple mixin for node.js propgrams. Taken from the [Testable Javascript](http://youtu.be/JjqKQ8ezwKQ) Google Tech Talk

Awesome Lists containing this project

README

        

# Mixup
Simple mixin for node.js propgrams. Taken from the [Testable Javascript](http://youtu.be/JjqKQ8ezwKQ) Google Tech Talk

# Installation

```bash
npm install -S simple-mixin'
```

# Usage

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