Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

dog-factory

C03052MIT0.1.5

A simple and beauty factory for js

factory, dog-factory

readme

dog-factory

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

Installation

Node.js:

npm install dog-factory

Usage

Create instance of dogFactory

import dogFactory from 'dog-factory'

const df = new dogFactory();

Create User Model

df.create('User', { 
  name: 'firstName', 
  phone: 'phone' 
})

Create Website model

df.create('Website', { 
  website: 'website' 
})

Associating website model with users & and changing props in user model

df.changeProperty('User', { 
  website: df.associateFull('Website', 5) 
})

Build User model array with 2 objects

df.build('User', 2)

License

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

This software is licensed under the MIT License.