Skip to content

Instantly share code, notes, and snippets.

@Raynos
Created October 6, 2011 14:49
Show Gist options
  • Save Raynos/1267586 to your computer and use it in GitHub Desktop.
Save Raynos/1267586 to your computer and use it in GitHub Desktop.
var Constructor = function _constructor(prop, arg) {
this.property = prop;
this.public = arg + "dynamic";
}
Constructor.prototype.method = function () {
...
}
var obj = new Constructor(42, "value of public");
var Proto = pd.create({
constructor: function _constructor(props, arg) {
this.public = arg + "dynamic";
},
method = function() {
...
}
});
var obj = Proto({
property: 42,
}, "value of public");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment