ES6 Subclasses and Object.defineProperty

ES6 Subclasses and Object.defineProperty

(Photo by William Warby) Object.defineProperty provides a handy way to add properties to JavaScript objects. It’s been around for a while, but with the introduction of class syntax in ES6, it’s not immediately obvious how to use it to add properties to a...
Stampit: Prototypal JavaScript Made Easy

Stampit: Prototypal JavaScript Made Easy

I’ve been writing heavy-duty JavaScript for about six years. I’ve used lots of libraries that provide “classes” of various types—ExtJS, Dojo, JavaScriptMVC, and more. Yet none of them felt right. In retrospect, I feel like the standard class-based inheritance is...