mixmatch
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

mixmatch

Yet another mixin.

Installation

npm install mixmatch

Example

import Mixin from 'mixmatch';

class HasHeight extends Mixin {
  get height() {
    return 72;
  }

  heightAsMeters() {
    return this.height * 0.0254;
  }
}

class Person {
  constructor(name) {
    this.name = name;
  }
}

HasHeight.includeInto(Person);

const me = new Person('me');

console.log(me.height);
console.log(me.heightAsMeters());

/mixmatch/

    Package Sidebar

    Install

    npm i mixmatch

    Weekly Downloads

    343

    Version

    0.0.4

    License

    BSD-3-Clause

    Unpacked Size

    7.14 kB

    Total Files

    9

    Last publish

    Collaborators

    • fulcrumapp
    • zhm