jneen/pjs
View on GitHub ↗ ★ 196 JavaScript
Classes for javascript that don't suck.
3 mentions on Hacker News by 2 people: 1 story, 2 comments · first 2012-01-04 · latest 2014-02-15
20082026
-
PJs https://github.com/jayferd/pjs is the sanest js classical inheritance library I've seen. It's very lightweight, doesn't mess with Object.prototype, and interoperates seamlessly with coffeescript classes.
comment by jwmerrill · 2014-02-15 · in The world's smallest and fastest classical JavaScript inheritance pattern -
…not rely on this behavior, though: https://developer.mozilla.org/en/JavaScript/Reference/Global... In p.js (github.com/jayferd/pjs), I used this pattern/workaround: var Breakfast = function(args) { if (!(this instanceof Breakfast)) return…
comment by jneen · 2012-02-14 · in JavaScript: Warts and workarounds