# dog-factory

`dog-factory` is a simple and beauty factory library for Node.js and the browser

## Installation

Node.js:

```bash
npm install dog-factory
```

## Usage

Create instance of dogFactory

```javascript
import dogFactory from 'dog-factory'

const df = new dogFactory();

```
Create User Model
```javascript
df.create('User', { 
  name: 'firstName', 
  phone: 'phone' 
})
```
Create Website model
```javascript
df.create('Website', { 
  website: 'website' 
})
```
Associating website model with users & and changing props in user model
```javascript
df.changeProperty('User', { 
  website: df.associateFull('Website', 5) 
})
```
Build User model array with 2 objects
```javascript
df.build('User', 2)
```

## License

Copyright (c) 2019 Ernesto Cobos <c0305@cobos.xyz>.   

This software is licensed under the [MIT
License](https://github.com/C0305/dog-factory/blob/master/LICENSE).