https://github.com/onesy-me/models
Models
https://github.com/onesy-me/models
amaui back-end backend browser express front-end frontend javascript js library model models node nodejs typescript web
Last synced: 5 months ago
JSON representation
Models
- Host: GitHub
- URL: https://github.com/onesy-me/models
- Owner: onesy-me
- License: mit
- Created: 2022-02-03T12:25:56.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-12-12T22:32:40.000Z (over 1 year ago)
- Last Synced: 2025-03-23T01:41:19.873Z (over 1 year ago)
- Topics: amaui, back-end, backend, browser, express, front-end, frontend, javascript, js, library, model, models, node, nodejs, typescript, web
- Language: TypeScript
- Homepage: https://docs.onesy.me/library/models
- Size: 413 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
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 :yellow_heart:
### Add
```sh
yarn add @onesy/models
```
### Use
```javascript
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
```sh
yarn
```
Test
```sh
yarn test
```
### Prod
Build
```sh
yarn build
```