Skip to content
Update Extending Models authored by Steven Collins's avatar Steven Collins
...@@ -3,7 +3,16 @@ ...@@ -3,7 +3,16 @@
## Getting the class mixin function ## Getting the class mixin function
The class mixers can be accessed in two ways, the first being: The class mixers can be accessed in two ways, the first being:
```javascript ```javascript
import { associationMixer, Association } from '@openrailuk/common';
associationMixer(yourMixin);
```
or you can use
```javascript
import * as common from '@openrailuk/common'; import * as common from '@openrailuk/common';
common.associationMixer common.associationMixer(yourMixin);
``` ```
An example usage of the mixins can be found at this snippet:
<script src="https://gitlab.com/openrail/uk/common-nodejs/snippets/1723609.js"></script>
\ No newline at end of file