0.0.24 • Published 4 years ago
@lamnhan/schemata v0.0.24
Schemata
Commonly used data models.
Install & usage
- Interface package:
npm i @lamnhan/schemataUse the interface:
import { Post } from '@lamnhan/schemata';
const posts: Post[] = [];
const recordPosts: Record<string, Post> = {};
const post: Post = {
id: '...',
title: '...',
};- Angular utilities:
npm i @lamnhan/ngx-schemataUse services:
import { PostDataService } from '@lamnhan/ngx-schemata';
class Foo {
public readonly posts$ = this.postDataService.list();
public readonly post$ = this.postDataService.get('foo');
}Use pipes:
// listing pipe
import { PostsDataPipeModule } from '@lamnhan/ngx-schemata';
// getting pipe
import { PostDataPipeModule } from '@lamnhan/ngx-schemata';<!-- listing -->
<div *ngIf="10 | posts | async; let items">
<ul *ngIf="items.length">
<li *ngFor="let item of items">{{ item.title }}</li>
</ul>
</div>
<!-- getting -->
<div *ngIf="'foo' | post | async; let item">
<h1>{{ item.title }}</h1>
</div>Models
:blue_heart: Category categories :earth_asia:
:blue_heart: Tag tags :earth_asia:
:blue_heart: Page pages :earth_asia:
:blue_heart: Post posts :earth_asia:
:blue_heart: Author authors :earth_asia:
:blue_heart: Thread threads :earth_asia:
:blue_heart: User users :x:
:blue_heart: Option options :earth_asia:
:green_heart: Bundle bundles :earth_asia:
:green_heart: Audio audios :earth_asia:
:green_heart: Video videos :earth_asia:
:green_heart: Product products :earth_asia:
:heart: Order orders :x:
:purple_heart: Notification notifications :earth_asia:
:purple_heart: Promotion promotions :earth_asia:
License
@lamnhan/schemata is released under the MIT license.
0.0.23
4 years ago
0.0.24
4 years ago
0.0.22
4 years ago
0.0.21
4 years ago
0.0.20
4 years ago
0.0.19
4 years ago
0.0.15
4 years ago
0.0.16
4 years ago
0.0.17
4 years ago
0.0.18
4 years ago
0.0.14
4 years ago
0.0.10
4 years ago
0.0.11
4 years ago
0.0.12
4 years ago
0.0.9
4 years ago
0.0.8
4 years ago
0.0.7
4 years ago
0.0.6
5 years ago
0.0.3
5 years ago
0.0.4
5 years ago
0.0.2
5 years ago
0.0.1
5 years ago
1.0.3
5 years ago
1.0.2
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago