npm.io
1.1.21 • Published 1 year ago

@amaui/models

Licence
MIT
Version
1.1.21
Deps
3
Size
123 kB
Vulns
0
Weekly
0


onesy logo

onesy 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


Add

yarn add @onesy/models 

Use

  import express from 'express';
  import { Query, Response } from '@onesy/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

yarn

Test

yarn test
Prod

Build

yarn build

Keywords