# es6-class-mixin

> Tiny tool to add mixins for ES6 classes.

Latest version **1.0.5** (published 2016-02-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install es6-class-mixin
pnpm add es6-class-mixin
yarn add es6-class-mixin
bun add es6-class-mixin
```

## 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.5 |
| Published | 2016-02-04 |
| First published | 2015-02-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Shuvalov Anton |
| Maintainers | shuvalov-anton |
| Keywords | ES2015, ES6, mixin, class, inheritance |

## Links

- npm: https://www.npmjs.com/package/es6-class-mixin
- Repository: https://github.com/rambler-digital-solutions/es6-class-mixin
- Issues: https://github.com/rambler-digital-solutions/es6-class-mixin/issues
- npm.io page: https://npm.io/package/es6-class-mixin

## Recent versions

- 1.0.5 (latest) — 2016-02-04
- 1.0.4 — 2015-11-21
- 1.0.3 — 2015-10-13
- 1.0.2 — 2015-02-21
- 1.0.1 — 2015-02-21
- 1.0.0 — 2015-02-19

## README

# Mixin for ES6 classes

[![Build Status](https://travis-ci.org/rambler-digital-solutions/es6-class-mixin.svg?branch=master)](https://travis-ci.org/rambler-digital-solutions/es6-class-mixin)

Mixins for ES6 Classes. Based on [@mattmccray's gist](https://gist.github.com/mattmccray/e41e2bf18b13a153ce67)

## Install

```
npm i -S es6-class-mixin
```

## API

`mixin` extends given class by object with functions or properties.

```js
mixin(ParentClass, ...mixins) // return new MixedClass extended by Mixins
```

## Examples

```js
// Basic
const mixin = require('es6-class-mixin');

class ListItem {};

let draggable = {
  drag() { /* … */ }
};

let droppable = {
  drop() { /* … */ }
};

class DraggableItem extends mixin(ListItem, draggable, droppable) {}
```

```js
// Backbone
class Input extends mixin(Backbone.View, Dispatcher.mixin) {}
```

- - -

## License

MIT

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