Joined October 2013
·
Posted to
Agile traceability in each git commit with Hooks
over 1 year
ago
Nice post! Wasn't aware of this functionality. I've always done it the other way around, i,.e. a script that does the stuff I want then calls git commands.
Posted to
The prototype is your friend (if you care about perf)
over 1 year
ago
@dtao lol yeah I noticed that! Damn you markdown! Also, if we're going for performance. getters/setters aren't really the way to go yet. But, just throwing it out there as yet another alternative.
Posted to
The prototype is your friend (if you care about perf)
over 1 year
ago
Object.defineProperty(ValueObject.prototype, "value", {
get: function () {return this.superValue},
set: function (v) (this.superValue = v;)
});
EDIT: No underscores....stupid markdown
Achievements
307 Karma
12,463 Total ProTip Views
Cub
Have at least one original jQuery or Prototype open source repo
Forked
Have a project valued enough to be forked by someone else
Hey @oronm, this is a very different type of functionality than underscore's extend. The extend in underscore simply copies properties from one object to another. This is creating a new object in which the prototype chain extends from the object on which the method was called, includes each argument passed, and ends with the new object.