Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/nisaacson/simple-mixin
- Owner: nisaacson
- Created: 2013-04-30T18:39:35.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-05-01T04:33:18.000Z (over 11 years ago)
- Last Synced: 2024-04-14T14:46:49.664Z (7 months ago)
- Language: JavaScript
- Size: 117 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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()
```