1.3.15 • Published 2 years ago

@mars-man/models v1.3.15

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Mars Man Models Logo

Description

Data Model / Form / Repository Pattern

Table of Contents

  1. Design Overview
  2. Installation
  3. API Documentation
  4. Examples

Development

System Requirements

  • Dependencies:
    • node: >14.15
    • npm: >6.14

Commands

# installation
npm i 

# tests
# run full test suite
`jest`

# run specific test suite
`jest forms.test.ts`

# run specific test 
`jest model.test.ts -t "async true"`

# build
npm run build

# publish
npm publish

Form

The goal of the form is

  • to use the same DTO object the server expects to validate the input
    • this requires formatting the data to/from frontend and backend data structure
  • to abstract

Repo

Repos are the data sources, implemented with the repository pattern.

They can effectively be any data source (GraphQL, Firestore, Clod Storage...) but as of right now only APIRepo is implemented

Models

Models orchestrate the forms and repos

Examples

1.3.13

3 years ago

1.3.14

3 years ago

1.3.15

2 years ago

1.3.10

3 years ago

1.3.11

3 years ago

1.3.12

3 years ago

1.3.9

3 years ago

1.3.8

3 years ago

1.3.7

3 years ago

1.3.6

3 years ago

1.3.5

3 years ago

1.3.4

3 years ago

1.3.2

3 years ago

1.2.3

3 years ago

1.3.1

3 years ago

1.2.2

3 years ago

1.3.0

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.1.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago