Skip to content

Instantly share code, notes, and snippets.

function delegate (child) {
// make it happen
return function inner () {
var self = this;
var func = Object.getOwnPropertyNames(this).filter(function (prop) {
return inner === self[prop];
}).pop();
return this[child][func].apply(this[child], arguments);
@jedireza
jedireza / index.js
Created September 18, 2014 19:54
requirebin sketch
var Model = require('ampersand-model');
var Foo = Model.extend({
props: {
keys: {
type: 'object',
default: function () {return {};}
}
},
echo: function () {