Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/amaui-org/amaui-models

Models
https://github.com/amaui-org/amaui-models

amaui back-end backend browser express front-end frontend javascript js library model models node nodejs typescript web

Last synced: about 2 months ago
JSON representation

Models

Awesome Lists containing this project

README

        



amaui logo

amaui Models


Models



MIT license    
Production ready    
UMD 4.2kb gzipped    
100% test cov    
Browser and Nodejs


Very simple code    
Modern code    
Junior friendly    
Typescript    
Made with :yellow_heart:


## Getting started

### Add

```sh
yarn add @amaui/models
```

### Use

```javascript
import express from 'express';
import { Query, Response } from '@amaui/models';

async function route(req: express.Request, res: express.Response) {
const query = Query.fromRequest(req);

const response = await todoCollection.searchMany(query);

return res.status(200).json(Response.fromQuery(response));
}

// etc.
```

### Dev

Install

```sh
yarn
```

Test

```sh
yarn test
```

### Prod

Build

```sh
yarn build
```