MCPcopy Index your code
hub / github.com/Olical/Heir

github.com/Olical/Heir @v4.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v4.0.0 ↗ · + Follow
2 symbols 2 edges 2 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Heir npm

Helper functions for prototypical inheritance in JavaScript.

Use the source code and JSDoc comments as documentation, here's a quick example to get you started.

const heir = require('heir')

// Create the base class.
function Base() {}

// Add a method.
Base.prototype.foo = function () {
  return 'Base#foo'
}

// Create a sub class which inherits from base.
function Sub() {}
heir.inherit(Sub, Base)

// Mix in some functionality enhancing objects.
heir.mixin(Sub, events)
heir.mixin(Sub, pooling)

// Change the original method.
Sub.prototype.foo = function () {
  return [
    'Sub#foo',
    Sub._super.foo.call(this)
  ].join(', ')
}

// Create an instance of Sub and call it's method.
const s = new Sub()
s.foo() // Returns "Sub#foo, Base#foo"

Unlicense

This project is given to you under the unlicense, as documented in the UNLICENSE file in this directory. Enjoy.

Core symbols most depended-on inside this repo

Source
called by 0
tests.js
Destination
called by 0
tests.js

Shape

Function 2

Languages

TypeScript100%

Modules by API surface

tests.js2 symbols

For agents

$ claude mcp add Heir \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact