isaacs/inherits — explained in plain English
Analysis updated 2026-07-17 · repo last pushed 2025-10-25
Share the same class-inheritance behavior between server-side Node.js code and browser-side JavaScript.
Avoid pulling in a large Node.js utility polyfill just to get one inheritance helper in the browser.
Build a UI component library or shared module that needs consistent inheritance in both environments.
Upgrade an old browser-targeted codebase's inheritance helper without adding extra bundle weight.
| isaacs/inherits | paraschopra/make-pages-interactive | ebookfoundation/free-programming-books-search | |
|---|---|---|---|
| Stars | 353 | 339 | 368 |
| Language | JavaScript | JavaScript | JavaScript |
| Last pushed | 2025-10-25 | — | — |
| Maintenance | Quiet | — | — |
| Setup difficulty | easy | easy | moderate |
| Complexity | 1/5 | 2/5 | 2/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Version 1.0 and 2.0 are incompatible, upgrading old code requires changing how the parent class is referenced.
This package gives JavaScript developers a simple way to set up inheritance, the mechanism where one object type borrows behavior from another. It mirrors a helper function that comes built into Node.js (a popular JavaScript runtime), but it's designed to work smoothly in web browsers too. In JavaScript, you often want one "class" of object to extend another, so a Dog can reuse everything an Animal already does. Node.js provides a function for this, but pulling that function into browser-based code normally drags along a large, heavy utility package. This project solves that by giving you the exact same function with a lightweight browser-friendly version that skips the baggage. It even includes a fallback for very old browsers. You'd use this if you're writing JavaScript that needs to run both on a server (Node.js) and in a browser, and you want inheritance to work consistently in both places without bloating your download size. For example, if you're building a UI component library that shares code between a backend and frontend, this keeps things tidy. The README recommends using it instead of the built-in Node.js version whenever your code might end up running in a browser. One thing to note: version 1.0 of this package behaved differently and isn't compatible with the current version 2.0. If you're upgrading from the old version, be aware that the way you reference a parent class changed (it now uses super_), and the new version overwrites existing prototype fields rather than preserving them. For most people starting fresh, this won't matter, but it's worth knowing if you're maintaining older code.
A tiny JavaScript helper that sets up class inheritance, matching Node.js's built-in version but lightweight enough to use in browsers too.
Mainly JavaScript. The stack also includes JavaScript, Node.js.
Quiet — no commits in 6-12 months (last push 2025-10-25).
Use freely for any purpose, including commercial use, as long as you keep the copyright notice.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
double-check against the repo, no cap.