# joos-inheritance

> Javascript class inheritance

Latest version **1.0.3** (published 2016-06-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install joos-inheritance
pnpm add joos-inheritance
yarn add joos-inheritance
bun add joos-inheritance
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2016-06-27 |
| First published | 2016-05-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Andrey F. Mindubaev |
| Maintainers | covex |
| Keywords | class, inheritance |

## Links

- npm: https://www.npmjs.com/package/joos-inheritance
- Repository: https://github.com/covex-nn/joos-inheritance
- Homepage: https://github.com/covex-nn/joos-inheritance#readme
- Issues: https://github.com/covex-nn/joos-inheritance/issues
- npm.io page: https://npm.io/package/joos-inheritance

## Recent versions

- 1.0.3 (latest) — 2016-06-27
- 1.0.2 — 2016-06-21
- 1.0.1 — 2016-05-12
- 1.0.0 — 2016-05-12

## README

# JavaScript inheritance

[![Build Status](https://travis-ci.org/covex-nn/joos-inheritance.svg?branch=master)](https://travis-ci.org/covex-nn/joos-inheritance)
[![dependency status](https://david-dm.org/covex-nn/joos-inheritance.svg)](https://david-dm.org/covex-nn/joos-inheritance)
[![devDependency Status](https://david-dm.org/covex-nn/joos-inheritance/dev-status.svg)](https://david-dm.org/covex-nn/joos-inheritance#info=devDependencies) 
[![npm version](https://badge.fury.io/js/joos-inheritance.svg)](https://badge.fury.io/js/joos-inheritance)

Javascript class inheritance

## Usage example

```javascript
var JooS = require("joos-inheritance");

/**
 * Class Function0
 * @constructor
 */
var Function0 = function(value0) {
    this.value0 = value0;
};

Function0.prototype.method1 = function() {
    return this.value0;
};

/**
 * @class Class0
 * @extends Function0
 */
var Class0 = JooS.Reflect(
    Function0,
    /** @lends Class0.prototype */
    {
        __constructor: function(value0) {
            this.__constructor.__parent(value0);
        },
        method1: function() {
            return "[" + this.method1.__parent() + "]";
        }
    }
);

/**
 * @class NewClass1
 * @extends Function0
 */
var NewClass1 = JooS.Reflect(
    Class0,
    /** @lends NewClass1.prototype */
    {
        method1: function() {
            return "!" + this.method1.__parent() + "!";
        }
    }
);

var NativeObj0 = new Function0("qwerty");
console.log(NativeObj0.method1()); // --> qwerty

var Obj1 = new Class0("qwerty");
console.log(Obj1.method1()); // --> [qwerty]

var NewObj1 = new NewClass1("qwerty");
console.log(NewObj1.method1()); // --> ![qwerty]!
```

---
_Source: https://npm.io/package/joos-inheritance · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
