From 958b7835c31325fae8ca3efe752d51290089255a Mon Sep 17 00:00:00 2001 From: Paul Melnikow Date: Fri, 28 Apr 2017 11:27:07 -0400 Subject: [PATCH] Slight tweak to clarify how to require mix --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index beef37f..975e12b 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,8 @@ mixwith.js makes some use cases very easy: mixwith.js also provides a little bit of sugar with the `mix()` function that makes applying mixins read a little more naturally: ```javascript +const { mix } = require('mixwith') + class MyClass extends mix(MySuperClass).with(MyMixin, OtherMixin) { // class methods here, go ahead, use super! } @@ -94,6 +96,8 @@ Mixins defined with the mixwith.js decorators do not require any helpers to use, Classes use mixins in their `extends` clause. Classes that use mixins can define and override constructors and methods as usual. ```javascript +const { mix } = require('mixwith') + class MyClass extends mix(MySuperClass).with(MyMixin) { constructor(a, b) {