@lamnhan/ngx-schemata
TypeScript icon, indicating that this package has built-in type declarations

0.0.17 • Public • Published

Schemata

Commonly used data models.

License Support me on Patreon PayPal Ask me anything

Install & usage

  • Interface package:
npm i @lamnhan/schemata

Use 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-schemata

Use 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

💙 Category categories 🌏

Source

💙 Tag tags 🌏

Source

💙 Page pages 🌏

Source

💙 Post posts 🌏

Source

💙 Author authors 🌏

Source

💙 Thread threads 🌏

Source

💙 User users

Source

💙 Option options 🌏

Source

💚 Bundle bundles 🌏

Source

💚 Audio audios 🌏

Source

💚 Video videos 🌏

Source

💚 Product products 🌏

Source

❤️ Order orders

Source

💜 Notification notifications 🌏

Source

💜 Promotion promotions 🌏

Source

License

@lamnhan/schemata is released under the MIT license.

Package Sidebar

Install

npm i @lamnhan/ngx-schemata

Weekly Downloads

0

Version

0.0.17

License

MIT

Unpacked Size

1.41 MB

Total Files

205

Last publish

Collaborators

  • lamnhan