# class-generator-es5

> Generation and extending classes via ES5 style

Latest version **0.0.3** (published 2015-07-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install class-generator-es5
pnpm add class-generator-es5
yarn add class-generator-es5
bun add class-generator-es5
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2015-07-25 |
| First published | 2015-07-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Alex Weaver |
| Maintainers | node.weaver |
| Keywords | class, extend, object |

## Links

- npm: https://www.npmjs.com/package/class-generator-es5
- Repository: https://github.com/nodeweaver/class-generator-es5
- Homepage: https://github.com/nodeweaver/class-generator-es5#readme
- Issues: https://github.com/nodeweaver/class-generator-es5/issues
- npm.io page: https://npm.io/package/class-generator-es5

## Dependencies (1)

- [lodash](https://npm.io/package/lodash.md) *

## Recent versions

- 0.0.3 (latest) — 2015-07-25
- 0.0.1 — 2015-07-20

## README

class-generator-es5
============

Module for generating and extending classes. Returning class has static method getInstance for returning new instance

Install
-------
    npm install class-generator-es5

Usage
-------
    var CG = require('class-generator-es5');

    var ParentClass = CG(function() {
      console.log('Log from parent constructor');
    }, {
      foo: function() {
        return 42;
      }  
    });
    
    var ChildClass = CG(function() {
      console.log('Log from child constructor');
    }, {
      getMeaning: function() {
        return {sense: this.foo()};
      }
    }, ParentClass);
    
    var childInstance = new ChildClass();
    console.log(childInstance.getMeaning());
    
    var someInstance = CG({print: console.log}).getInstance();
    someInstance.print('I`m instance!');

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