@4geit/swg-chance-user-helper
Version:
chance mixin to generate fake user data based on AccountModel definition
43 lines (31 loc) • 1 kB
Markdown
# @4geit/swg-chance-user-helper [](//badge.fury.io/js/@4geit%2Fswg-chance-user-helper)
---
chance mixin to generate fake user data based on AccountModel definition
## Installation
1. A recommended way to install ***@4geit/swg-chance-user-helper*** is through [npm](//www.npmjs.com/search?q=@4geit/swg-chance-user-helper) package manager using the following command:
```bash
npm i @4geit/swg-chance-user-helper --save
```
Or use `yarn` using the following command:
```bash
yarn add @4geit/swg-chance-user-helper
```
2. All you have to do is to import the `@4geit/swg-chance-user-helper` package in your controller or mock file as below:
```js
// ...
const swgChanceUserHelper = require('@4geit/swg-chance-user-helper');
// ...
```
And use it with one of your endpoint controller as below:
```js
// ...
module.exports = {
// ...
getItems: swgChanceUserHelper(
(req, res) => {
// ...
}
),
// ...
};
```