Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

extends-classes

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

extends-classes

Extend from multiple classes!

  • 1.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
15K
increased by49.36%
Maintainers
1
Weekly downloads
 
Created
Source

Extend Multiple Classes

Ever wanted to extend from multiple classes in Javascript? well now you can.

Usage

const classes = require('extends-classes');

class Test extends classes (A, B, C) {
}

Method missing:

const classes = require('extends-classes');

class Test extends classes (A, B, C) {
  constructor() {
    super();
  }

  __call(method, args) {
    console.log(`'${method}()' is missing!`);
  }
}

const test = new Test();

test.somethingThatIsNonExistent();
// 'somethingThatIsNonExistent()' is missing!

MethodMissing is included in the stack, see method-missing.

Check out the test folder for more!

Installation

$ npm install extends-classes

Features

  • Extend multiple es6 classes.
  • Simple and light-weight.
  • Includes MethodMissing.
  • Written in ES6+ for node.js 6+.
  • Clean solution to extending from multiple classes.

Options

If you don't like the naming, just change it when requiring.

const many = require('extends-classes');

class Test extends many (A, B, C) {
  // class stuff.
}

Tests

From the package

$ npm test

License

MIT

Keywords

FAQs

Package last updated on 31 Mar 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc